diff --git a/modules/ripple_app/rpc/RPCHandler.cpp b/modules/ripple_app/rpc/RPCHandler.cpp index 4fb5c21c8..99d11004b 100644 --- a/modules/ripple_app/rpc/RPCHandler.cpp +++ b/modules/ripple_app/rpc/RPCHandler.cpp @@ -106,6 +106,7 @@ Json::Value RPCHandler::transactionSign (Json::Value params, bool bSubmit, bool { return rpcError (rpcINVALID_PARAMS); } + std::string sType = txJSON["TransactionType"].asString (); Ledger::pointer lSnapshot = mNetOps->getCurrentSnapshot (); AccountState::pointer asSrc = bOffline @@ -122,7 +123,19 @@ Json::Value RPCHandler::transactionSign (Json::Value params, bool bSubmit, bool return rpcError (rpcSRC_ACT_NOT_FOUND); } - if ("Payment" == txJSON["TransactionType"].asString ()) + if (!txJSON.isMember ("Fee") + && ( + "AccountSet" == sType + || "Payment" == sType + || "OfferCreate" == sType + || "OfferCancel" == sType + || "TrustSet" == sType)) + { +// feeReq = lSnapshot->scaleFeeLoad(, + txJSON["Fee"] = (int) theConfig.FEE_DEFAULT; + } + + if ("Payment" == sType) { RippleAddress dstAccountID; @@ -137,11 +150,6 @@ Json::Value RPCHandler::transactionSign (Json::Value params, bool bSubmit, bool return rpcError (rpcDST_ACT_MALFORMED); } - if (!txJSON.isMember ("Fee")) - { - txJSON["Fee"] = (int) theConfig.FEE_DEFAULT; - } - if (txJSON.isMember ("Paths") && params.isMember ("build_path")) { // Asking to build a path when providing one is an error. @@ -205,16 +213,6 @@ Json::Value RPCHandler::transactionSign (Json::Value params, bool bSubmit, bool } } - if (!txJSON.isMember ("Fee") - && ( - "AccountSet" == txJSON["TransactionType"].asString () - || "OfferCreate" == txJSON["TransactionType"].asString () - || "OfferCancel" == txJSON["TransactionType"].asString () - || "TrustSet" == txJSON["TransactionType"].asString ())) - { - txJSON["Fee"] = (int) theConfig.FEE_DEFAULT; - } - if (!txJSON.isMember ("Sequence")) { if (bOffline)