diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 28ade1f458e..608a1b5da27 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -1662,12 +1662,12 @@ UniValue finalizepsbt(const JSONRPCRequest& request) mtx.vin[i].scriptWitness = psbtx.inputs[i].final_script_witness; } ssTx << mtx; - result.push_back(Pair("hex", HexStr(ssTx.begin(), ssTx.end()))); + result.pushKV("hex", HexStr(ssTx.begin(), ssTx.end())); } else { ssTx << psbtx; - result.push_back(Pair("psbt", EncodeBase64((unsigned char*)ssTx.data(), ssTx.size()))); + result.pushKV("psbt", EncodeBase64((unsigned char*)ssTx.data(), ssTx.size())); } - result.push_back(Pair("complete", complete)); + result.pushKV("complete", complete); return result; } diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 73dfebf114d..4e539a85def 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4630,8 +4630,8 @@ UniValue walletprocesspsbt(const JSONRPCRequest& request) UniValue result(UniValue::VOBJ); CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); ssTx << psbtx; - result.push_back(Pair("psbt", EncodeBase64((unsigned char*)ssTx.data(), ssTx.size()))); - result.push_back(Pair("complete", complete)); + result.pushKV("psbt", EncodeBase64((unsigned char*)ssTx.data(), ssTx.size())); + result.pushKV("complete", complete); return result; }