Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RPC] Fix argument parsing and example for getbalance #2141

Merged
merged 1 commit into from
Jan 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/rpc/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ static const CRPCConvertParam vRPCConvertParams[] = {
{ "listreceivedbylabel", 0 },
{ "listreceivedbylabel", 1 },
{ "listreceivedbylabel", 2 },
{ "getbalance", 0 },
{ "getbalance", 1 },
{ "getbalance", 2 },
{ "getbalance", 3 },
{ "getbalance", 4 },
{ "getshieldbalance", 1 },
{ "getshieldbalance", 2 },
{ "rawshieldsendmany", 1 },
Expand Down
6 changes: 3 additions & 3 deletions src/wallet/rpcwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1958,7 +1958,7 @@ UniValue getbalance(const JSONRPCRequest& request)
"thus affected by options which limit spendability such as -spendzeroconfchange.\n"

"\nArguments:\n"
"1. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
"1. minconf (numeric, optional, default=0) Only include transactions confirmed at least this many times.\n"
"2. includeWatchonly (bool, optional, default=false) Also include balance in watchonly addresses (see 'importaddress')\n"
"3. includeDelegated (bool, optional, default=true) Also include balance delegated to cold stakers\n"
"4. includeShield (bool, optional, default=true) Also include shield balance\n"
Expand All @@ -1970,9 +1970,9 @@ UniValue getbalance(const JSONRPCRequest& request)
"\nThe total amount in the wallet\n" +
HelpExampleCli("getbalance", "") +
"\nThe total amount in the wallet, with at least 5 confirmations\n" +
HelpExampleCli("getbalance", "\"*\" 6") +
HelpExampleCli("getbalance", "6") +
"\nAs a json rpc call\n" +
HelpExampleRpc("getbalance", "\"*\", 6"));
HelpExampleRpc("getbalance", "6"));

LOCK2(cs_main, pwalletMain->cs_wallet);

Expand Down