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)
1263
1263
EnsureWalletIsUnlocked (pwallet);
1264
1264
1265
1265
// 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)) {
1268
1267
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
+ }
1269
1271
1270
1272
// Shuffle recipient list
1271
1273
std::shuffle (vecSend.begin (), vecSend.end (), FastRandomContext ());
You can’t perform that action at this time.
0 commit comments