Skip to content

Commit

Permalink
Output from transaction_entry
Browse files Browse the repository at this point in the history
  • Loading branch information
Bronek committed Oct 26, 2023
1 parent e4ce8b1 commit 0fb0517
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/ripple/rpc/handlers/TransactionEntry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,24 @@ doTransactionEntry(RPC::JsonContext& context)
}
else
{
jvResult[jss::tx_json] = sttx->getJson(JsonOptions::none);
if (context.apiVersion > 1)
{
std::string hash;
jvResult[jss::tx_json] =
sttx->getJson(JsonOptions::none, false, {std::ref(hash)});
jvResult[jss::hash] = hash;
// TODO set `jvResult[jss::close_time_iso]`
}
else
jvResult[jss::tx_json] = sttx->getJson(JsonOptions::none);

RPC::insertDeliverMax(
jvResult[jss::tx_json], sttx->getTxnType(), context.apiVersion);

auto const json_meta =
(context.apiVersion > 1 ? jss::meta : jss::metadata);
if (stobj)
jvResult[jss::metadata] = stobj->getJson(JsonOptions::none);
jvResult[json_meta] = stobj->getJson(JsonOptions::none);
// 'accounts'
// 'engine_...'
// 'ledger_...'
Expand Down

0 comments on commit 0fb0517

Please sign in to comment.