aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-03-14 07:39:04 +0800
committerDan <danjm.com@gmail.com>2018-03-14 07:45:35 +0800
commitd6e4d2e80d05f64bb543e524c6288b8b7c33e4c1 (patch)
tree8d352cc48bdccc3173e33f220fdafcd9f88d1320 /ui
parent9d7640996aa9b63fb6c9271d7e0698e7acdc559e (diff)
downloadtangerine-wallet-browser-d6e4d2e80d05f64bb543e524c6288b8b7c33e4c1.tar
tangerine-wallet-browser-d6e4d2e80d05f64bb543e524c6288b8b7c33e4c1.tar.gz
tangerine-wallet-browser-d6e4d2e80d05f64bb543e524c6288b8b7c33e4c1.tar.bz2
tangerine-wallet-browser-d6e4d2e80d05f64bb543e524c6288b8b7c33e4c1.tar.lz
tangerine-wallet-browser-d6e4d2e80d05f64bb543e524c6288b8b7c33e4c1.tar.xz
tangerine-wallet-browser-d6e4d2e80d05f64bb543e524c6288b8b7c33e4c1.tar.zst
tangerine-wallet-browser-d6e4d2e80d05f64bb543e524c6288b8b7c33e4c1.zip
Use new submittedTime field to correctly show retry button in old and new ui.
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/pending-tx/confirm-send-ether.js2
-rw-r--r--ui/app/components/tx-list-item.js10
-rw-r--r--ui/app/components/tx-list.js6
3 files changed, 9 insertions, 9 deletions
diff --git a/ui/app/components/pending-tx/confirm-send-ether.js b/ui/app/components/pending-tx/confirm-send-ether.js
index 899c2617c..8fe58482b 100644
--- a/ui/app/components/pending-tx/confirm-send-ether.js
+++ b/ui/app/components/pending-tx/confirm-send-ether.js
@@ -11,7 +11,7 @@ const hexToBn = require('../../../../app/scripts/lib/hex-to-bn')
const {
conversionUtil,
addCurrencies,
- multiplyCurrencies
+ multiplyCurrencies,
} = require('../../conversion-util')
const GasFeeDisplay = require('../send/gas-fee-display-v2')
diff --git a/ui/app/components/tx-list-item.js b/ui/app/components/tx-list-item.js
index 62426252f..941fcb69c 100644
--- a/ui/app/components/tx-list-item.js
+++ b/ui/app/components/tx-list-item.js
@@ -178,18 +178,18 @@ TxListItem.prototype.getSendTokenTotal = async function () {
TxListItem.prototype.showRetryButton = function () {
const {
transactionStatus,
- transactionTime,
+ transactionSubmittedTime,
selectedAddressTxList,
transactionId,
txParams,
} = this.props
const currentNonce = txParams.nonce
const currentNonceTxs = selectedAddressTxList.filter(tx => tx.txParams.nonce === currentNonce)
- const currentStatusNonceTx = currentNonceTxs.filter(tx =>
- tx.status !== 'rejected' && tx.status !== 'failed')
- const isLastPassingWithNonce = currentStatusNonceTx[currentStatusNonceTx.length - 1].id === transactionId
+ const currentNonceSubmittedTxs = currentNonceTxs.filter(tx => transactionStatus === 'submitted')
+ const isLastSubmittedTxWithCurrentNonce =
+ currentNonceSubmittedTxs[currentNonceSubmittedTxs.length - 1].id === transactionId
- return transactionStatus === 'submitted' && isLastPassingWithNonce && Date.now() - transactionTime > 30000
+ return isLastSubmittedTxWithCurrentNonce && Date.now() - transactionSubmittedTime > 30000
}
TxListItem.prototype.resubmit = function () {
diff --git a/ui/app/components/tx-list.js b/ui/app/components/tx-list.js
index 30f816d58..add70a266 100644
--- a/ui/app/components/tx-list.js
+++ b/ui/app/components/tx-list.js
@@ -77,7 +77,7 @@ TxList.prototype.renderTransactionListItem = function (transaction, conversionRa
transactionId: transaction.id,
transactionHash: transaction.hash,
transactionNetworkId: transaction.metamaskNetworkId,
- transactionTime: transaction.time,
+ transactionSubmittedTime: transaction.transactionSubmittedTime,
}
const {
@@ -88,7 +88,7 @@ TxList.prototype.renderTransactionListItem = function (transaction, conversionRa
transactionId,
transactionHash,
transactionNetworkId,
- transactionTime,
+ transactionSubmittedTime,
} = props
const { showConfTxPage } = this.props
@@ -103,7 +103,7 @@ TxList.prototype.renderTransactionListItem = function (transaction, conversionRa
transactionHash,
conversionRate,
tokenInfoGetter: this.tokenInfoGetter,
- transactionTime,
+ transactionSubmittedTime,
}
const isUnapproved = transactionStatus === 'unapproved'