diff --git a/src/core_write.cpp b/src/core_write.cpp index ffad7897ff..8999f9406f 100644 --- a/src/core_write.cpp +++ b/src/core_write.cpp @@ -334,7 +334,10 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, bool include_add } if (calculate_fee) { - const CAmount fee = amt_total_in - amt_total_out; + CAmount fee = amt_total_in - amt_total_out; + if (tx.nType == TRANSACTION_ASSET_UNLOCK) { + fee = CHECK_NONFATAL(GetTxPayload(tx))->getFee(); + } CHECK_NONFATAL(MoneyRange(fee)); entry.pushKV("fee", ValueFromAmount(fee)); }