[zcash/zcash] Add Sapling support to z_getbalance and z_gettotalbalance (#3436)

str4d commented on this pull request.

> @@ -4265,8 +4271,7 @@ UniValue z_mergetoaddress(const UniValue& params, bool fHelp)
maxedOutNotesFlag = true;
} else {
estimatedTxSize += increase;
— // TODO: Add Sapling support
— auto zaddr = boost::get(entry.address);
+ auto zaddr = entry.address;
SproutSpendingKey zkey;
pwalletMain->GetSproutSpendingKey(zaddr, zkey);
noteInputs.emplace_back(entry.jsop, entry.plaintext.note(zaddr), nValue, zkey);

There is no Sapling address at this point; the loop only iterates over `CSproutNotePlaintextEntry`. The fact we used a `boost::get<>` here was AFAICT a bug (but harmless because it was a no-op).