diff options
author | frankiebee <frankie.diamond@gmail.com> | 2017-09-13 03:19:26 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2017-09-13 03:19:26 +0800 |
commit | 9e0c0745ab0f2aa207b0c062ad11efd8df1bb6c5 (patch) | |
tree | 580a22a2923d7cab5e75e8554e9b07d2c7c3bdc1 /app/scripts/controllers | |
parent | 3ad67d1b14b5b56002cf34ab6dbb18d602705827 (diff) | |
download | tangerine-wallet-browser-9e0c0745ab0f2aa207b0c062ad11efd8df1bb6c5.tar tangerine-wallet-browser-9e0c0745ab0f2aa207b0c062ad11efd8df1bb6c5.tar.gz tangerine-wallet-browser-9e0c0745ab0f2aa207b0c062ad11efd8df1bb6c5.tar.bz2 tangerine-wallet-browser-9e0c0745ab0f2aa207b0c062ad11efd8df1bb6c5.tar.lz tangerine-wallet-browser-9e0c0745ab0f2aa207b0c062ad11efd8df1bb6c5.tar.xz tangerine-wallet-browser-9e0c0745ab0f2aa207b0c062ad11efd8df1bb6c5.tar.zst tangerine-wallet-browser-9e0c0745ab0f2aa207b0c062ad11efd8df1bb6c5.zip |
linting && format fixing
Diffstat (limited to 'app/scripts/controllers')
-rw-r--r-- | app/scripts/controllers/transactions.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js index 3cb6a609e..3ff53e72b 100644 --- a/app/scripts/controllers/transactions.js +++ b/app/scripts/controllers/transactions.js @@ -1,5 +1,4 @@ const EventEmitter = require('events') -const extend = require('xtend') const ObservableStore = require('obs-store') const ethUtil = require('ethereumjs-util') const Transaction = require('ethereumjs-tx') @@ -60,17 +59,14 @@ module.exports = class TransactionController extends EventEmitter { this.pendingTxTracker = new PendingTransactionTracker({ provider: this.provider, nonceTracker: this.nonceTracker, + retryLimit: 3500, // Retry 3500 blocks, or about 1 day. getBalance: (address) => { const account = this.ethStore.getState().accounts[address] if (!account) return return account.balance }, - publishTransaction: this.query.sendRawTransaction, + publishTransaction: (rawTx) => this.query.sendRawTransaction(rawTx), getPendingTransactions: this.txStateManager.getPendingTransactions.bind(this.txStateManager), - giveUpOnTransaction: (txId) => { - const err = new Error(`Gave up submitting after 3500 blocks un-mined.`) - this.setTxStatusFailed(txId, err) - }, }) this.txStateManager.store.subscribe(() => this.emit('updateBadge')) @@ -193,7 +189,7 @@ module.exports = class TransactionController extends EventEmitter { // wait for a nonce nonceLock = await this.nonceTracker.getNonceLock(fromAddress) // add nonce to txParams - txMeta.txParams.nonce = nonceLock.nextNonce + txMeta.txParams.nonce = ethUtil.addHexPrefix(nonceLock.nextNonce.toString(16)) // add nonce debugging information to txMeta txMeta.nonceDetails = nonceLock.nonceDetails this.txStateManager.updateTx(txMeta) |