From 3f7279161347543ce4e997d78ea89a4043491145 Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Thu, 5 Nov 2020 06:34:01 +0100 Subject: wallet: fix bug in RPC send options when empty, options were not being populated by arguments of the same name found while adding test coverage in 603c0050 --- src/wallet/rpcwallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wallet') diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index ebcab1227d..4a3212e6fe 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4087,7 +4087,7 @@ static RPCHelpMan send() if (!wallet) return NullUniValue; CWallet* const pwallet = wallet.get(); - UniValue options = request.params[3]; + UniValue options{request.params[3].isNull() ? UniValue::VOBJ : request.params[3]}; if (options.exists("feeRate") || options.exists("fee_rate") || options.exists("estimate_mode") || options.exists("conf_target")) { if (!request.params[1].isNull() || !request.params[2].isNull()) { throw JSONRPCError(RPC_INVALID_PARAMETER, "Use either conf_target and estimate_mode or the options dictionary to control fee rate"); -- cgit v1.2.3