diff --git a/src/wallet/asyncrpcoperation_shieldcoinbase.cpp b/src/wallet/asyncrpcoperation_shieldcoinbase.cpp index 4c200d19a..46cf1ffd9 100644 --- a/src/wallet/asyncrpcoperation_shieldcoinbase.cpp +++ b/src/wallet/asyncrpcoperation_shieldcoinbase.cpp @@ -219,9 +219,13 @@ bool ShieldToAddress::operator()(const libzcash::SaplingPaymentAddress &zaddr) c if(donation) { //if donation>0, send X% of value to zaddr and Y% of of value to donatezaddr where X+Y=100% - //TODO: TESTING zaddr only, only use on regtest - //TODO: randomly select from a set - auto dzaddr = "zregtestsapling1y30nwg0clsu6gcyrnvht8hdyfk3vwtszlh6kc4z5hv9hmpxzg2g0nx7c60xeecggm9x9gma96t4"; + auto dzaddr = ""; + if(Params().NetworkIDString() == "regtest") { + dzaddr = "zregtestsapling1y30nwg0clsu6gcyrnvht8hdyfk3vwtszlh6kc4z5hv9hmpxzg2g0nx7c60xeecggm9x9gma96t4"; + } else { + //TODO: randomly select from a set + dzaddr = "zs1uhmry4jjaymhh2x7x53fkahp57u60qr54ydtcd6c2nzu73lgm78a4kml2x7ylm547hu2qqtsnw5"; + } auto donationZaddr = DecodePaymentAddress(dzaddr); if (!IsValidPaymentAddress(donationZaddr)) { throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid donation zaddr, Unknown address format: ") + dzaddr);