z_mergetoaddress fix
This commit is contained in:
@@ -4789,9 +4789,11 @@ UniValue z_mergetoaddress(const UniValue& params, bool fHelp)
|
|||||||
if (useAnySprout || useAnySapling || zaddrs.size() > 0) {
|
if (useAnySprout || useAnySapling || zaddrs.size() > 0) {
|
||||||
// Get available notes
|
// Get available notes
|
||||||
std::vector<CSproutNotePlaintextEntry> sproutEntries;
|
std::vector<CSproutNotePlaintextEntry> sproutEntries;
|
||||||
std::vector<SaplingNoteEntry> saplingEntries;
|
//std::vector<SaplingNoteEntry> saplingEntries;
|
||||||
pwalletMain->GetFilteredNotes(sproutEntries, saplingEntries, zaddrs);
|
//pwalletMain->GetFilteredNotes(sproutEntries, saplingEntries, zaddrs);
|
||||||
|
std::vector<SaplingNoteEntry> saplingEntries,skipsapling;
|
||||||
|
pwalletMain->GetFilteredNotes(sproutEntries, useAnySprout == 0 ? saplingEntries : skipsapling, zaddrs);
|
||||||
|
|
||||||
// If Sapling is not active, do not allow sending from a sapling addresses.
|
// If Sapling is not active, do not allow sending from a sapling addresses.
|
||||||
if (!saplingActive && saplingEntries.size() > 0) {
|
if (!saplingActive && saplingEntries.size() > 0) {
|
||||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, Sapling has not activated");
|
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, Sapling has not activated");
|
||||||
|
|||||||
Reference in New Issue
Block a user