Skip to content

Commit b9a46f6

Browse files
committed
refactor: use IsPlatformTransfer in core_write and rpc/blockchain
1 parent f6169fa commit b9a46f6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/core_write.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, bool include_add
335335

336336
if (calculate_fee) {
337337
CAmount fee = amt_total_in - amt_total_out;
338-
if (tx.nType == TRANSACTION_ASSET_UNLOCK) {
338+
if (tx.IsPlatformTransfer()) {
339339
fee = CHECK_NONFATAL(GetTxPayload<CAssetUnlockPayload>(tx))->getFee();
340340
}
341341
CHECK_NONFATAL(MoneyRange(fee));

src/rpc/blockchain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2452,7 +2452,7 @@ static RPCHelpMan getblockstats()
24522452

24532453
CAmount txfee = tx_total_in - tx_total_out;
24542454

2455-
if (tx->nType == TRANSACTION_ASSET_UNLOCK) {
2455+
if (tx->IsPlatformTransfer()) {
24562456
txfee = CHECK_NONFATAL(GetTxPayload<CAssetUnlockPayload>(*tx))->getFee();
24572457
}
24582458

0 commit comments

Comments
 (0)