aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/controllers/transactions.js
diff options
context:
space:
mode:
authorDan Finlay <542863+danfinlay@users.noreply.github.com>2017-09-28 01:57:02 +0800
committerGitHub <noreply@github.com>2017-09-28 01:57:02 +0800
commite72083f6e81f888f714125f7c050e777ea5c9bdd (patch)
tree8177fb150ae254b838cabec028b3c5e08fbc951e /app/scripts/controllers/transactions.js
parentff5e8746bee0d7461df02e7f2186ff7c90bfcb50 (diff)
parentca0dff06f5d9283e57b452dcc7e85c31b248b8aa (diff)
downloadtangerine-wallet-browser-e72083f6e81f888f714125f7c050e777ea5c9bdd.tar
tangerine-wallet-browser-e72083f6e81f888f714125f7c050e777ea5c9bdd.tar.gz
tangerine-wallet-browser-e72083f6e81f888f714125f7c050e777ea5c9bdd.tar.bz2
tangerine-wallet-browser-e72083f6e81f888f714125f7c050e777ea5c9bdd.tar.lz
tangerine-wallet-browser-e72083f6e81f888f714125f7c050e777ea5c9bdd.tar.xz
tangerine-wallet-browser-e72083f6e81f888f714125f7c050e777ea5c9bdd.tar.zst
tangerine-wallet-browser-e72083f6e81f888f714125f7c050e777ea5c9bdd.zip
Merge branch 'master' into filter-fixes-moar
Diffstat (limited to 'app/scripts/controllers/transactions.js')
-rw-r--r--app/scripts/controllers/transactions.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js
index 4e52a3c14..4cd307b07 100644
--- a/app/scripts/controllers/transactions.js
+++ b/app/scripts/controllers/transactions.js
@@ -22,7 +22,7 @@ module.exports = class TransactionController extends EventEmitter {
this.provider = opts.provider
this.blockTracker = opts.blockTracker
this.signEthTx = opts.signTransaction
- this.ethStore = opts.ethStore
+ this.accountTracker = opts.accountTracker
this.nonceTracker = new NonceTracker({
provider: this.provider,
@@ -52,7 +52,7 @@ module.exports = class TransactionController extends EventEmitter {
provider: this.provider,
nonceTracker: this.nonceTracker,
getBalance: (address) => {
- const account = this.ethStore.getState().accounts[address]
+ const account = this.accountTracker.getState().accounts[address]
if (!account) return
return account.balance
},
@@ -73,7 +73,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 ethStore hasent been populated by the results yet
+ // where accountTracker hasent been populated by the results yet
this.blockTracker.once('latest', () => {
this.blockTracker.on('latest', this.pendingTxTracker.resubmitPendingTxs.bind(this.pendingTxTracker))
})
@@ -434,6 +434,7 @@ module.exports = class TransactionController extends EventEmitter {
const txMeta = this.getTx(txId)
txMeta.status = status
this.emit(`${txMeta.id}:${status}`, txId)
+ this.emit(`${status}`, txId)
if (status === 'submitted' || status === 'rejected') {
this.emit(`${txMeta.id}:finished`, txMeta)
}