* Call RPC getnewaddress. * @returns getnewaddress response as a UniValue object. */
| 1068 | * @returns getnewaddress response as a UniValue object. |
| 1069 | */ |
| 1070 | static UniValue GetNewAddress() |
| 1071 | { |
| 1072 | std::optional<std::string> wallet_name{}; |
| 1073 | if (gArgs.IsArgSet("-rpcwallet")) wallet_name = gArgs.GetArg("-rpcwallet", ""); |
| 1074 | DefaultRequestHandler rh; |
| 1075 | return ConnectAndCallRPC(&rh, "getnewaddress", /* args=*/{}, wallet_name); |
| 1076 | } |
| 1077 | |
| 1078 | /** |
| 1079 | * Check bounds and set up args for RPC generatetoaddress params: nblocks, address, maxtries. |
no test coverage detected