diff --git a/src/ripple/rpc/impl/DeliveredAmount.cpp b/src/ripple/rpc/impl/DeliveredAmount.cpp index 1ad5e7210..418a5aa20 100644 --- a/src/ripple/rpc/impl/DeliveredAmount.cpp +++ b/src/ripple/rpc/impl/DeliveredAmount.cpp @@ -61,22 +61,7 @@ getDeliveredAmount( if (serializedTx->isFieldPresent(sfAmount)) { - using namespace std::chrono_literals; - - // Ledger 4594095 is the first ledger in which the DeliveredAmount field - // was present when a partial payment was made and its absence indicates - // that the amount delivered is listed in the Amount field. - // - // If the ledger closed long after the DeliveredAmount code was deployed - // then its absence indicates that the amount delivered is listed in the - // Amount field. DeliveredAmount went live January 24, 2014. - // 446000000 is in Feb 2014, well after DeliveredAmount went live - if (getLedgerIndex() >= 4594095 || - getCloseTime() > NetClock::time_point{446000000s} || - (serializedTx && serializedTx->isFieldPresent(sfNetworkID))) - { - return serializedTx->getFieldAmount(sfAmount); - } + return serializedTx->getFieldAmount(sfAmount); } return {}; diff --git a/src/test/app/SetHookTSH_test.cpp b/src/test/app/SetHookTSH_test.cpp index 3e209c0fb..339721955 100644 --- a/src/test/app/SetHookTSH_test.cpp +++ b/src/test/app/SetHookTSH_test.cpp @@ -5466,6 +5466,7 @@ private: params[jss::transaction] = txIds[i]; auto const jrr = env.rpc("json", "tx", to_string(params)); auto const meta = jrr[jss::result][jss::meta]; + BEAST_EXPECT(meta[jss::delivered_amount] == "1000000"); for (auto const& node : meta[sfAffectedNodes.jsonName]) { auto const nodeType = node[sfLedgerEntryType.jsonName];