diff --git a/src/core_write.cpp b/src/core_write.cpp index 8999f9406f..2edee784bb 100644 --- a/src/core_write.cpp +++ b/src/core_write.cpp @@ -335,7 +335,7 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, bool include_add if (calculate_fee) { CAmount fee = amt_total_in - amt_total_out; - if (tx.nType == TRANSACTION_ASSET_UNLOCK) { + if (tx.IsPlatformTransfer()) { fee = CHECK_NONFATAL(GetTxPayload(tx))->getFee(); } CHECK_NONFATAL(MoneyRange(fee)); diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index fe44b5f2c3..409d24c879 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -2452,7 +2452,7 @@ static RPCHelpMan getblockstats() CAmount txfee = tx_total_in - tx_total_out; - if (tx->nType == TRANSACTION_ASSET_UNLOCK) { + if (tx->IsPlatformTransfer()) { txfee = CHECK_NONFATAL(GetTxPayload(*tx))->getFee(); }