aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/controllers
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2017-09-30 03:54:05 +0800
committerfrankiebee <frankie.diamond@gmail.com>2017-09-30 03:54:05 +0800
commitac80eaca1fc9923cd5696282ba2bc6bace22ff83 (patch)
tree72a69440c6b4ab213ff494ab8ee7344f8fb9cfec /app/scripts/controllers
parent77963e84170ee39c9d227e7cc4097b19f947099b (diff)
downloadtangerine-wallet-browser-ac80eaca1fc9923cd5696282ba2bc6bace22ff83.tar.gz
tangerine-wallet-browser-ac80eaca1fc9923cd5696282ba2bc6bace22ff83.tar.zst
tangerine-wallet-browser-ac80eaca1fc9923cd5696282ba2bc6bace22ff83.zip
pending-tx - dont check the balance to rebrodcast
Diffstat (limited to 'app/scripts/controllers')
-rw-r--r--app/scripts/controllers/transactions.js11
1 files changed, 1 insertions, 10 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js
index 4f5c94675..9fdec1ead 100644
--- a/app/scripts/controllers/transactions.js
+++ b/app/scripts/controllers/transactions.js
@@ -32,7 +32,6 @@ module.exports = class TransactionController extends EventEmitter {
this.provider = opts.provider
this.blockTracker = opts.blockTracker
this.signEthTx = opts.signTransaction
- this.accountTracker = opts.accountTracker
this.memStore = new ObservableStore({})
this.query = new EthQuery(this.provider)
@@ -61,11 +60,6 @@ module.exports = class TransactionController extends EventEmitter {
provider: this.provider,
nonceTracker: this.nonceTracker,
retryLimit: 3500, // Retry 3500 blocks, or about 1 day.
- getBalance: (address) => {
- const account = this.accountTracker.store.getState().accounts[address]
- if (!account) return
- return account.balance
- },
publishTransaction: (rawTx) => this.query.sendRawTransaction(rawTx),
getPendingTransactions: this.txStateManager.getPendingTransactions.bind(this.txStateManager),
})
@@ -84,10 +78,7 @@ module.exports = class TransactionController extends EventEmitter {
this.blockTracker.on('block', this.pendingTxTracker.checkForTxInBlock.bind(this.pendingTxTracker))
// this is a little messy but until ethstore has been either
// removed or redone this is to guard against the race condition
- // where accountTracker hasent been populated by the results yet
- this.blockTracker.once('latest', () => {
- this.blockTracker.on('latest', this.pendingTxTracker.resubmitPendingTxs.bind(this.pendingTxTracker))
- })
+ this.blockTracker.on('latest', this.pendingTxTracker.resubmitPendingTxs.bind(this.pendingTxTracker))
this.blockTracker.on('sync', this.pendingTxTracker.queryPendingTxs.bind(this.pendingTxTracker))
// memstore is computed from a few different stores
this._updateMemstore()