From 323164877cfd3291d12e094aa13f9ca4a7df50f4 Mon Sep 17 00:00:00 2001 From: Scott Schurr Date: Fri, 16 Oct 2015 16:28:35 -0700 Subject: [PATCH] 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. --- src/ripple/net/impl/RPCCall.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/ripple/net/impl/RPCCall.cpp b/src/ripple/net/impl/RPCCall.cpp index 30bbb4e5a..f5756ad95 100644 --- a/src/ripple/net/impl/RPCCall.cpp +++ b/src/ripple/net/impl/RPCCall.cpp @@ -675,18 +675,16 @@ private: // submit_multisigned 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);