aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan J Miller <danjm.com@gmail.com>2019-03-22 22:50:25 +0800
committerGitHub <noreply@github.com>2019-03-22 22:50:25 +0800
commit2b992d2946fe4bf93687b259bcd6fa199769252f (patch)
treebbb2eee791b5d9e903b058267151b736184f8cef
parent468bc96bdfc08e80119b3d5b3a54a3cf84046af8 (diff)
downloadtangerine-wallet-browser-2b992d2946fe4bf93687b259bcd6fa199769252f.tar
tangerine-wallet-browser-2b992d2946fe4bf93687b259bcd6fa199769252f.tar.gz
tangerine-wallet-browser-2b992d2946fe4bf93687b259bcd6fa199769252f.tar.bz2
tangerine-wallet-browser-2b992d2946fe4bf93687b259bcd6fa199769252f.tar.lz
tangerine-wallet-browser-2b992d2946fe4bf93687b259bcd6fa199769252f.tar.xz
tangerine-wallet-browser-2b992d2946fe4bf93687b259bcd6fa199769252f.tar.zst
tangerine-wallet-browser-2b992d2946fe4bf93687b259bcd6fa199769252f.zip
Fix gas fee in the submitted step of the transaction details activity log. (#6301)
-rw-r--r--ui/app/components/app/transaction-activity-log/transaction-activity-log.util.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/ui/app/components/app/transaction-activity-log/transaction-activity-log.util.js b/ui/app/components/app/transaction-activity-log/transaction-activity-log.util.js
index ac5a00c31..b74513879 100644
--- a/ui/app/components/app/transaction-activity-log/transaction-activity-log.util.js
+++ b/ui/app/components/app/transaction-activity-log/transaction-activity-log.util.js
@@ -51,7 +51,14 @@ const statusHash = {
* @returns {Array}
*/
export function getActivities (transaction, isFirstTransaction = false) {
- const { id, hash, history = [], txReceipt: { status } = {}, type } = transaction
+ const {
+ id,
+ hash,
+ history = [],
+ txParams: { gas: paramsGasLimit, gasPrice: paramsGasPrice},
+ xReceipt: { status } = {},
+ type,
+ } = transaction
let cachedGasLimit = '0x0'
let cachedGasPrice = '0x0'
@@ -88,7 +95,9 @@ export function getActivities (transaction, isFirstTransaction = false) {
if (path in eventPathsHash && op === REPLACE_OP) {
switch (path) {
case STATUS_PATH: {
- const gasFee = getHexGasTotal({ gasLimit: cachedGasLimit, gasPrice: cachedGasPrice })
+ const gasFee = cachedGasLimit === '0x0' && cachedGasPrice === '0x0'
+ ? getHexGasTotal({ gasLimit: paramsGasLimit, gasPrice: paramsGasPrice })
+ : getHexGasTotal({ gasLimit: cachedGasLimit, gasPrice: cachedGasPrice })
if (value in statusHash) {
let eventKey = statusHash[value]