Skip to content

Commit 88d4d5f

Browse files
committed
rpc: add help for enumeratesigners and walletdisplayaddress
1 parent b0db187 commit 88d4d5f

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

src/rpc/external_signer.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313

1414
static RPCHelpMan enumeratesigners()
1515
{
16-
return RPCHelpMan{
17-
"enumeratesigners",
16+
return RPCHelpMan{"enumeratesigners",
1817
"Returns a list of external signers from -signer.",
1918
{},
2019
RPCResult{
@@ -28,8 +27,12 @@ static RPCHelpMan enumeratesigners()
2827
}
2928
}
3029
},
31-
RPCExamples{""},
32-
[](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue {
30+
RPCExamples{
31+
HelpExampleCli("enumeratesigners", "")
32+
+ HelpExampleRpc("enumeratesigners", "")
33+
},
34+
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
35+
{
3336
const std::string command = gArgs.GetArg("-signer", "");
3437
if (command == "") throw JSONRPCError(RPC_MISC_ERROR, "Error: restart bitcoind with -signer=<cmd>");
3538
std::string chain = gArgs.GetChainName();

src/wallet/rpcwallet.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4529,9 +4529,8 @@ static RPCHelpMan upgradewallet()
45294529
#ifdef ENABLE_EXTERNAL_SIGNER
45304530
static RPCHelpMan walletdisplayaddress()
45314531
{
4532-
return RPCHelpMan{
4533-
"walletdisplayaddress",
4534-
"Display address on an external signer for verification.\n",
4532+
return RPCHelpMan{"walletdisplayaddress",
4533+
"Display address on an external signer for verification.",
45354534
{
45364535
{"address", RPCArg::Type::STR, RPCArg::Optional::NO, /* default_val */ "", "bitcoin address to display"},
45374536
},
@@ -4542,7 +4541,8 @@ static RPCHelpMan walletdisplayaddress()
45424541
}
45434542
},
45444543
RPCExamples{""},
4545-
[](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue {
4544+
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
4545+
{
45464546
std::shared_ptr<CWallet> const wallet = GetWalletForJSONRPCRequest(request);
45474547
if (!wallet) return NullUniValue;
45484548
CWallet* const pwallet = wallet.get();

0 commit comments

Comments
 (0)