aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-03-14 08:02:22 +0800
committerDan <danjm.com@gmail.com>2018-03-14 08:02:22 +0800
commit8c7988978f05fa57bba892efb42ae0036ce25771 (patch)
treecaf2fa09c6a14c005e24f1ce1076eca277dbbccd /ui/app
parente293b6349c522171db26c57e718c5213aa6d5cb3 (diff)
downloadtangerine-wallet-browser-8c7988978f05fa57bba892efb42ae0036ce25771.tar.gz
tangerine-wallet-browser-8c7988978f05fa57bba892efb42ae0036ce25771.tar.zst
tangerine-wallet-browser-8c7988978f05fa57bba892efb42ae0036ce25771.zip
Undefined check in showRetryButton
Diffstat (limited to 'ui/app')
-rw-r--r--ui/app/components/tx-list-item.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/app/components/tx-list-item.js b/ui/app/components/tx-list-item.js
index d2fc57b13..453f7e95c 100644
--- a/ui/app/components/tx-list-item.js
+++ b/ui/app/components/tx-list-item.js
@@ -186,10 +186,11 @@ TxListItem.prototype.showRetryButton = function () {
const currentNonce = txParams.nonce
const currentNonceTxs = selectedAddressTxList.filter(tx => tx.txParams.nonce === currentNonce)
const currentNonceSubmittedTxs = currentNonceTxs.filter(tx => transactionStatus === 'submitted')
- const isLastSubmittedTxWithCurrentNonce =
- currentNonceSubmittedTxs[currentNonceSubmittedTxs.length - 1].id === transactionId
+ const lastSubmittedTxWithCurrentNonce = currentNonceSubmittedTxs[currentNonceSubmittedTxs.length - 1]
+ const currentTxIsLatestWithNonce = lastSubmittedTxWithCurrentNonce
+ && lastSubmittedTxWithCurrentNonce.id === transactionId
- return isLastSubmittedTxWithCurrentNonce && Date.now() - transactionSubmittedTime > 30000
+ return currentTxIsLatestWithNonce && Date.now() - submittedTime > 30000
}
TxListItem.prototype.resubmit = function () {