diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2017-12-22 06:29:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-22 06:29:04 +0800 |
commit | 06f496310ce7d719bbb5690f307db143ba57a1a7 (patch) | |
tree | 7f90db07f52e0f042a641e82451c3ae7ff4dc61a /app | |
parent | d3f5ad874e4bf90cda4e440f9b0635c6ac416382 (diff) | |
parent | 33dbee3db9f6d66777039579789f36618c95c5fe (diff) | |
download | tangerine-wallet-browser-06f496310ce7d719bbb5690f307db143ba57a1a7.tar tangerine-wallet-browser-06f496310ce7d719bbb5690f307db143ba57a1a7.tar.gz tangerine-wallet-browser-06f496310ce7d719bbb5690f307db143ba57a1a7.tar.bz2 tangerine-wallet-browser-06f496310ce7d719bbb5690f307db143ba57a1a7.tar.lz tangerine-wallet-browser-06f496310ce7d719bbb5690f307db143ba57a1a7.tar.xz tangerine-wallet-browser-06f496310ce7d719bbb5690f307db143ba57a1a7.tar.zst tangerine-wallet-browser-06f496310ce7d719bbb5690f307db143ba57a1a7.zip |
Merge pull request #2793 from MetaMask/i2681-DoNotFailPending
Do not fail pending transactions after any amount of time
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/controllers/transactions.js | 1 | ||||
-rw-r--r-- | app/scripts/lib/pending-tx-tracker.js | 7 |
2 files changed, 0 insertions, 8 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js index f95b5e39a..7c7efb84d 100644 --- a/app/scripts/controllers/transactions.js +++ b/app/scripts/controllers/transactions.js @@ -59,7 +59,6 @@ module.exports = class TransactionController extends EventEmitter { this.pendingTxTracker = new PendingTransactionTracker({ provider: this.provider, nonceTracker: this.nonceTracker, - retryTimePeriod: 86400000, // Retry 3500 blocks, or about 1 day. publishTransaction: (rawTx) => this.query.sendRawTransaction(rawTx), getPendingTransactions: this.txStateManager.getPendingTransactions.bind(this.txStateManager), getCompletedTransactions: this.txStateManager.getConfirmedTransactions.bind(this.txStateManager), diff --git a/app/scripts/lib/pending-tx-tracker.js b/app/scripts/lib/pending-tx-tracker.js index dc6e526fd..7956a3329 100644 --- a/app/scripts/lib/pending-tx-tracker.js +++ b/app/scripts/lib/pending-tx-tracker.js @@ -23,7 +23,6 @@ module.exports = class PendingTransactionTracker extends EventEmitter { this.query = new EthQuery(config.provider) this.nonceTracker = config.nonceTracker // default is one day - this.retryTimePeriod = config.retryTimePeriod || 86400000 this.getPendingTransactions = config.getPendingTransactions this.getCompletedTransactions = config.getCompletedTransactions this.publishTransaction = config.publishTransaction @@ -106,12 +105,6 @@ module.exports = class PendingTransactionTracker extends EventEmitter { this.emit('tx:block-update', txMeta, latestBlockNumber) } - if (Date.now() > txMeta.time + this.retryTimePeriod) { - const hours = (this.retryTimePeriod / 3.6e+6).toFixed(1) - const err = new Error(`Gave up submitting after ${hours} hours.`) - return this.emit('tx:failed', txMeta.id, err) - } - const firstRetryBlockNumber = txMeta.firstRetryBlockNumber || latestBlockNumber const txBlockDistance = Number.parseInt(latestBlockNumber, 16) - Number.parseInt(firstRetryBlockNumber, 16) |