mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-03 16:56:48 +00:00
refactor: Fill txJson based on apiVersion (#7109)
Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
This commit is contained in:
@@ -297,13 +297,24 @@ fillJsonQueue(json::Value& json, LedgerFill const& fill)
|
||||
txJson["last_result"] = transToken(*tx.lastResult);
|
||||
|
||||
auto&& temp = fillJsonTx(fill, bBinary, bExpanded, tx.txn, nullptr);
|
||||
if (fill.context->apiVersion > 1)
|
||||
if (temp.isObject())
|
||||
{
|
||||
copyFrom(txJson, temp);
|
||||
if (fill.context->apiVersion > 1)
|
||||
{
|
||||
copyFrom(txJson, temp);
|
||||
}
|
||||
else
|
||||
{
|
||||
copyFrom(txJson[jss::tx], temp);
|
||||
}
|
||||
}
|
||||
else if (fill.context->apiVersion > 1)
|
||||
{
|
||||
txJson[jss::hash] = temp;
|
||||
}
|
||||
else
|
||||
{
|
||||
copyFrom(txJson[jss::tx], temp);
|
||||
txJson[jss::tx] = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user