Skip to content

Commit

Permalink
[wallet] [rpc] print wallet name in getwalletinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
jnewbery authored and random-zebra committed Jun 2, 2021
1 parent fdf5da0 commit 1525281
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/wallet/rpcwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4010,6 +4010,7 @@ UniValue getwalletinfo(const JSONRPCRequest& request)

"\nResult:\n"
"{\n"
" \"walletname\": xxxxx, (string) the wallet name\n"
" \"walletversion\": xxxxx, (numeric) the wallet version\n"
" \"balance\": xxxxxxx, (numeric) the total PIV balance of the wallet (cold balance excluded)\n"
" \"delegated_balance\": xxxxx, (numeric) the PIV balance held in P2CS (cold staking) contracts\n"
Expand Down Expand Up @@ -4041,6 +4042,7 @@ UniValue getwalletinfo(const JSONRPCRequest& request)
LOCK2(cs_main, pwallet->cs_wallet);

UniValue obj(UniValue::VOBJ);
obj.pushKV("walletname", pwallet->GetName());
obj.pushKV("walletversion", pwallet->GetVersion());
obj.pushKV("balance", ValueFromAmount(pwallet->GetAvailableBalance()));
obj.pushKV("delegated_balance", ValueFromAmount(pwallet->GetDelegatedBalance()));
Expand Down

0 comments on commit 1525281

Please sign in to comment.