Skip to content

Commit

Permalink
Only return the tx hex string in rawdelegatestake
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuzzbawls committed Dec 24, 2020
1 parent 58e64b1 commit dab4677
Showing 1 changed file with 3 additions and 43 deletions.
46 changes: 3 additions & 43 deletions src/wallet/rpcwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1233,45 +1233,7 @@ UniValue rawdelegatestake(const JSONRPCRequest& request)
"7. \"fForceNotEnabled\" (boolean, optional, default = false) ONLY FOR TESTING: force the creation even if SPORK 17 is disabled (for tests).\n"

"\nResult:\n"
"{\n"
" \"txid\" : \"id\", (string) The transaction id (same as provided)\n"
" \"version\" : n, (numeric) The version\n"
" \"type\" : n, (numeric) The type\n"
" \"size\" : n, (numeric) The serialized transaction size\n"
" \"locktime\" : ttt, (numeric) The lock time\n"
" \"vin\" : [ (array of json objects)\n"
" {\n"
" \"txid\": \"id\", (string) The transaction id\n"
" \"vout\": n, (numeric) \n"
" \"scriptSig\": { (json object) The script\n"
" \"asm\": \"asm\", (string) asm\n"
" \"hex\": \"hex\" (string) hex\n"
" },\n"
" \"sequence\": n (numeric) The script sequence number\n"
" }\n"
" ,...\n"
" ],\n"
" \"vout\" : [ (array of json objects)\n"
" {\n"
" \"value\" : x.xxx, (numeric) The value in PIV\n"
" \"n\" : n, (numeric) index\n"
" \"scriptPubKey\" : { (json object)\n"
" \"asm\" : \"asm\", (string) the asm\n"
" \"hex\" : \"hex\", (string) the hex\n"
" \"reqSigs\" : n, (numeric) The required sigs\n"
" \"type\" : \"pubkeyhash\", (string) The type, eg 'pubkeyhash'\n"
" \"addresses\" : [ (json array of string)\n"
" \"pivxaddress\" (string) pivx address\n"
" ,...\n"
" ]\n"
" }\n"
" }\n"
" ,...\n"
" ],\n"
" \"extraPayloadSize\" : n (numeric) Size of extra payload. Only present if it's a special TX\n"
" \"extraPayload\" : \"hex\" (string) Hex encoded extra payload data. Only present if it's a special TX\n"
" \"hex\" : \"data\", (string) The serialized, hex-encoded data for 'txid'\n"
"}\n"
"\"transaction\" (string) hex string of the transaction\n"

"\nExamples:\n" +
HelpExampleCli("rawdelegatestake", "\"S1t2a3kab9c8c71VA78xxxy4MxZg6vgeS6\" 100") +
Expand All @@ -1284,10 +1246,7 @@ UniValue rawdelegatestake(const JSONRPCRequest& request)
CReserveKey reservekey(pwalletMain);
CreateColdStakeDelegation(request.params, wtx, reservekey);

UniValue result(UniValue::VOBJ);
TxToUniv(wtx, UINT256_ZERO, result);

return result;
return EncodeHexTx(wtx);
}


Expand Down Expand Up @@ -1753,6 +1712,7 @@ UniValue rawshieldsendmany(const JSONRPCRequest& request)
" based on the expected transaction size and the current value of -minRelayTxFee.\n"
"\nResult:\n"
"\"transaction\" (string) hex string of the transaction\n"

"\nExamples:\n"
+ HelpExampleCli("rawshieldsendmany",
"\"DMJRSsuU9zfyrvxVaAEFQqK4MxZg6vgeS6\" '[{\"address\": \"ps1ra969yfhvhp73rw5ak2xvtcm9fkuqsnmad7qln79mphhdrst3lwu9vvv03yuyqlh42p42st47qd\" ,\"amount\": 5.0}]'")
Expand Down

0 comments on commit dab4677

Please sign in to comment.