mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Make submit_multisigned command line consistent (RIPD-182):
In command line usage (only), the "sign", "submit", and "sign_for" commands do not require the submitted JSON to be wrapped in a tx_json object. Make the submit_multisigned command line behave consistently with the command line form of those other commands.
This commit is contained in:
committed by
Nik Bougalis
parent
6dbbb7406c
commit
323164877c
@@ -675,18 +675,16 @@ private:
|
||||
// submit_multisigned <json>
|
||||
Json::Value parseSubmitMultiSigned (Json::Value const& jvParams)
|
||||
{
|
||||
Json::Value jvRequest;
|
||||
Json::Reader reader;
|
||||
bool const bOffline = 2 == jvParams.size () && jvParams[1u].asString () == "offline";
|
||||
|
||||
if ((1 == jvParams.size () || bOffline)
|
||||
&& reader.parse (jvParams[0u].asString (), jvRequest))
|
||||
if (1 == jvParams.size ())
|
||||
{
|
||||
// Multisigned.
|
||||
if (bOffline)
|
||||
jvRequest["offline"] = true;
|
||||
|
||||
return jvRequest;
|
||||
Json::Value txJSON;
|
||||
Json::Reader reader;
|
||||
if (reader.parse (jvParams[0u].asString (), txJSON))
|
||||
{
|
||||
Json::Value jvRequest;
|
||||
jvRequest[jss::tx_json] = txJSON;
|
||||
return jvRequest;
|
||||
}
|
||||
}
|
||||
|
||||
return rpcError (rpcINVALID_PARAMS);
|
||||
|
||||
Reference in New Issue
Block a user