diff --git a/src/cpp/ripple/NetworkOPs.cpp b/src/cpp/ripple/NetworkOPs.cpp index 93b87b086..a00613e50 100644 --- a/src/cpp/ripple/NetworkOPs.cpp +++ b/src/cpp/ripple/NetworkOPs.cpp @@ -1291,7 +1291,7 @@ Json::Value NetworkOPs::pubBootstrapAccountInfo(Ledger::ref lpAccepted, const Ri void NetworkOPs::pubProposedTransaction(Ledger::ref lpCurrent, SerializedTransaction::ref stTxn, TER terResult) { - Json::Value jvObj = transJson(*stTxn, terResult, false, lpCurrent, "transaction"); + Json::Value jvObj = transJson(*stTxn, terResult, false, lpCurrent); { boost::recursive_mutex::scoped_lock sl(mMonitorLock); @@ -1375,7 +1375,7 @@ void NetworkOPs::reportFeeChange() theApp->getJobQueue().addJob(jtCLIENT, "reportFeeChange->pubServer", boost::bind(&NetworkOPs::pubServer, this)); } -Json::Value NetworkOPs::transJson(const SerializedTransaction& stTxn, TER terResult, bool bAccepted, Ledger::ref lpCurrent, const std::string& strType) +Json::Value NetworkOPs::transJson(const SerializedTransaction& stTxn, TER terResult, bool bAccepted, Ledger::ref lpCurrent) { Json::Value jvObj(Json::objectValue); std::string sToken; @@ -1383,7 +1383,7 @@ Json::Value NetworkOPs::transJson(const SerializedTransaction& stTxn, TER terRes transResultInfo(terResult, sToken, sHuman); - jvObj["type"] = strType; + jvObj["type"] = "transaction"; jvObj["transaction"] = stTxn.getJson(0); if (bAccepted) { jvObj["ledger_index"] = lpCurrent->getLedgerSeq(); @@ -1404,7 +1404,7 @@ Json::Value NetworkOPs::transJson(const SerializedTransaction& stTxn, TER terRes void NetworkOPs::pubAcceptedTransaction(Ledger::ref alAccepted, const ALTransaction& alTx) { - Json::Value jvObj = transJson(*alTx.getTxn(), alTx.getResult(), true, alAccepted, "transaction"); + Json::Value jvObj = transJson(*alTx.getTxn(), alTx.getResult(), true, alAccepted); jvObj["meta"] = alTx.getMeta()->getJson(0); { @@ -1503,7 +1503,7 @@ void NetworkOPs::pubAccountTransaction(Ledger::ref lpCurrent, const ALTransactio if (!notify.empty()) { - Json::Value jvObj = transJson(*alTx.getTxn(), alTx.getResult(), bAccepted, lpCurrent, "account"); + Json::Value jvObj = transJson(*alTx.getTxn(), alTx.getResult(), bAccepted, lpCurrent); if (alTx.isApplied()) jvObj["meta"] = alTx.getMeta()->getJson(0); diff --git a/src/cpp/ripple/NetworkOPs.h b/src/cpp/ripple/NetworkOPs.h index 01d502ae0..f714fd4a4 100644 --- a/src/cpp/ripple/NetworkOPs.h +++ b/src/cpp/ripple/NetworkOPs.h @@ -136,7 +136,7 @@ protected: void setMode(OperatingMode); - Json::Value transJson(const SerializedTransaction& stTxn, TER terResult, bool bAccepted, Ledger::ref lpCurrent, const std::string& strType); + Json::Value transJson(const SerializedTransaction& stTxn, TER terResult, bool bAccepted, Ledger::ref lpCurrent); bool haveConsensusObject(); Json::Value pubBootstrapAccountInfo(Ledger::ref lpAccepted, const RippleAddress& naAccountID); diff --git a/test/send-test.js b/test/send-test.js index 7910ba478..c3055f708 100644 --- a/test/send-test.js +++ b/test/send-test.js @@ -719,7 +719,7 @@ buster.testCase("Gateway", { }); self.remote - .on('account', function (m) { + .on('transaction', function (m) { // console.log("ACCOUNT: %s", JSON.stringify(m)); self.found = 1; }) @@ -857,7 +857,7 @@ buster.testCase("Gateway", { }); self.remote - .on('account', function (m) { + .on('transaction', function (m) { // console.log("ACCOUNT: %s", JSON.stringify(m)); self.found = 1; })