diff options
Diffstat (limited to 'ui/app/components/tx-list-item.js')
-rw-r--r-- | ui/app/components/tx-list-item.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ui/app/components/tx-list-item.js b/ui/app/components/tx-list-item.js index 7513ba267..474d62638 100644 --- a/ui/app/components/tx-list-item.js +++ b/ui/app/components/tx-list-item.js @@ -35,6 +35,7 @@ function mapStateToProps (state) { currentCurrency: getCurrentCurrency(state), contractExchangeRates: state.metamask.contractExchangeRates, selectedAddressTxList: state.metamask.selectedAddressTxList, + networkNonce: state.appState.networkNonce, } } @@ -209,6 +210,7 @@ TxListItem.prototype.showRetryButton = function () { selectedAddressTxList, transactionId, txParams, + networkNonce, } = this.props if (!txParams) { return false @@ -222,11 +224,7 @@ TxListItem.prototype.showRetryButton = function () { const currentTxIsLatestWithNonce = lastSubmittedTxWithCurrentNonce && lastSubmittedTxWithCurrentNonce.id === transactionId if (currentSubmittedTxs.length > 0) { - const earliestSubmitted = currentSubmittedTxs.reduce((tx1, tx2) => { - if (tx1.submittedTime < tx2.submittedTime) return tx1 - return tx2 - }) - currentTxSharesEarliestNonce = currentNonce === earliestSubmitted.txParams.nonce + currentTxSharesEarliestNonce = currentNonce === networkNonce } return currentTxSharesEarliestNonce && currentTxIsLatestWithNonce && Date.now() - transactionSubmittedTime > 30000 |