From dcbec53d4258c13b94321edbc33a2f2f80a8881c Mon Sep 17 00:00:00 2001 From: Norton Andreev Date: Wed, 11 Sep 2024 11:51:43 +0300 Subject: [PATCH] explorer: Fix Transactions Fee is not properly computed Resolves #2348 --- explorer/CHANGELOG.md | 3 +++ explorer/src/lib/chain-info/transformTransaction.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/explorer/CHANGELOG.md b/explorer/CHANGELOG.md index 4ed76b332c..8b1e7b8106 100644 --- a/explorer/CHANGELOG.md +++ b/explorer/CHANGELOG.md @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fix Transactions Fee is not properly computed [#2348] + ## [0.2.0] - 2024-08-26 ### Added @@ -58,6 +60,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#2061]: https://github.com/dusk-network/rusk/issues/2061 [#2159]: https://github.com/dusk-network/rusk/issues/2159 [#2220]: https://github.com/dusk-network/rusk/issues/2220 +[#2348]: https://github.com/dusk-network/rusk/issues/2348 diff --git a/explorer/src/lib/chain-info/transformTransaction.js b/explorer/src/lib/chain-info/transformTransaction.js index cf526356ae..59cc6b69a1 100644 --- a/explorer/src/lib/chain-info/transformTransaction.js +++ b/explorer/src/lib/chain-info/transformTransaction.js @@ -9,7 +9,7 @@ const transformTransaction = (tx) => ({ blockheight: tx.blockHeight, contract: tx.tx.callData ? capitalize(tx.tx.callData.fnName) : "Transfer", date: unixTsToDate(tx.blockTimestamp), - feepaid: tx.gasSpent, + feepaid: tx.gasSpent * tx.tx.gasPrice, gaslimit: tx.tx.gasLimit, gasprice: tx.tx.gasPrice, gasspent: tx.gasSpent,