File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1263,9 +1263,11 @@ static UniValue sendmany(const JSONRPCRequest& request)
12631263 EnsureWalletIsUnlocked (pwallet);
12641264
12651265 // Check funds
1266- CAmount nBalance = pwallet->GetLegacyBalance (ISMINE_SPENDABLE, nMinDepth, &strAccount);
1267- if (totalAmount > nBalance)
1266+ if (IsDeprecatedRPCEnabled (" accounts" ) && totalAmount > pwallet->GetLegacyBalance (ISMINE_SPENDABLE, nMinDepth, &strAccount)) {
12681267 throw JSONRPCError (RPC_WALLET_INSUFFICIENT_FUNDS, " Account has insufficient funds" );
1268+ } else if (!IsDeprecatedRPCEnabled (" accounts" ) && totalAmount > pwallet->GetLegacyBalance (ISMINE_SPENDABLE, nMinDepth, nullptr )) {
1269+ throw JSONRPCError (RPC_WALLET_INSUFFICIENT_FUNDS, " Wallet has insufficient funds" );
1270+ }
12691271
12701272 // Shuffle recipient list
12711273 std::shuffle (vecSend.begin (), vecSend.end (), FastRandomContext ());
You can’t perform that action at this time.
0 commit comments