aboutsummaryrefslogtreecommitdiffstats
path: root/old-ui
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 /old-ui
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 'old-ui')
-rw-r--r--old-ui/app/components/transaction-list-item.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/old-ui/app/components/transaction-list-item.js b/old-ui/app/components/transaction-list-item.js
index b9da171ba..3881d8c1c 100644
--- a/old-ui/app/components/transaction-list-item.js
+++ b/old-ui/app/components/transaction-list-item.js
@@ -34,10 +34,11 @@ TransactionListItem.prototype.showRetryButton = function () {
const currentNonce = txParams.nonce
const currentNonceTxs = transactions.filter(tx => tx.txParams.nonce === currentNonce)
const currentNonceSubmittedTxs = currentNonceTxs.filter(tx => tx.status === 'submitted')
- const isLastSubmittedTxWithCurrentNonce =
- currentNonceSubmittedTxs[currentNonceSubmittedTxs.length - 1].id === transaction.id
+ const lastSubmittedTxWithCurrentNonce = currentNonceSubmittedTxs[currentNonceSubmittedTxs.length - 1]
+ const currentTxIsLatestWithNonce = lastSubmittedTxWithCurrentNonce
+ && lastSubmittedTxWithCurrentNonce.id === transaction.id
- return isLastSubmittedTxWithCurrentNonce && Date.now() - submittedTime > 30000
+ return currentTxIsLatestWithNonce && Date.now() - submittedTime > 30000
}
TransactionListItem.prototype.render = function () {