Skip to content

Commit 4a05715

Browse files
committed
[wallet] [rpc] print wallet name in getwalletinfo
1 parent 09eacee commit 4a05715

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2447,6 +2447,7 @@ UniValue getwalletinfo(const JSONRPCRequest& request)
24472447
"Returns an object containing various wallet state info.\n"
24482448
"\nResult:\n"
24492449
"{\n"
2450+
" \"walletname\": xxxxx, (string) the wallet name\n"
24502451
" \"walletversion\": xxxxx, (numeric) the wallet version\n"
24512452
" \"balance\": xxxxxxx, (numeric) the total confirmed balance of the wallet in " + CURRENCY_UNIT + "\n"
24522453
" \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed balance of the wallet in " + CURRENCY_UNIT + "\n"
@@ -2469,6 +2470,7 @@ UniValue getwalletinfo(const JSONRPCRequest& request)
24692470
UniValue obj(UniValue::VOBJ);
24702471

24712472
size_t kpExternalSize = pwallet->KeypoolCountExternalKeys();
2473+
obj.push_back(Pair("walletname", pwallet->GetName()));
24722474
obj.push_back(Pair("walletversion", pwallet->GetVersion()));
24732475
obj.push_back(Pair("balance", ValueFromAmount(pwallet->GetBalance())));
24742476
obj.push_back(Pair("unconfirmed_balance", ValueFromAmount(pwallet->GetUnconfirmedBalance())));

0 commit comments

Comments
 (0)