[wallet] JSONRPCRequest for signrawtransaction and sendrawtransaction
This commit is contained in:
parent
f113e2d4e6
commit
f554aac4cf
|
@ -15,6 +15,7 @@
|
|||
#include <paymentdisclosuredb.h>
|
||||
#include <rpc/protocol.h>
|
||||
#include <rpc/server.h>
|
||||
#include <rpc/rawtransaction.cpp>
|
||||
#include <script/interpreter.h>
|
||||
#include <sodium.h>
|
||||
#include <timedata.h>
|
||||
|
@ -637,7 +638,9 @@ void AsyncRPCOperation_mergetoaddress::sign_send_raw_transaction(UniValue obj)
|
|||
|
||||
UniValue params = UniValue(UniValue::VARR);
|
||||
params.push_back(rawtxn);
|
||||
UniValue signResultValue = signrawtransaction(params, false);
|
||||
JSONRPCRequest jsonRequest;
|
||||
jsonRequest.params = params;
|
||||
UniValue signResultValue = signrawtransaction(jsonRequest);
|
||||
UniValue signResultObject = signResultValue.get_obj();
|
||||
UniValue completeValue = find_value(signResultObject, "complete");
|
||||
bool complete = completeValue.get_bool();
|
||||
|
@ -657,7 +660,9 @@ void AsyncRPCOperation_mergetoaddress::sign_send_raw_transaction(UniValue obj)
|
|||
params.clear();
|
||||
params.setArray();
|
||||
params.push_back(signedtxn);
|
||||
UniValue sendResultValue = sendrawtransaction(params, false);
|
||||
JSONRPCRequest jsonRequest;
|
||||
jsonRequest.params = params;
|
||||
UniValue sendResultValue = sendrawtransaction(jsonRequest);
|
||||
if (sendResultValue.isNull()) {
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, "Send raw transaction did not return an error or a txid.");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue