diff options
author | frankiebee <frankie.diamond@gmail.com> | 2017-09-27 07:52:08 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2017-09-27 07:54:04 +0800 |
commit | 9fd545811226c16e11e4f2dc100a348e07f094bf (patch) | |
tree | 6953acde88e0c7ba8f39382c7a9947a0393ffe81 /app/scripts/controllers/transactions.js | |
parent | 8ab23c713db1f5d45abb0ba433450591b8759809 (diff) | |
download | tangerine-wallet-browser-9fd545811226c16e11e4f2dc100a348e07f094bf.tar tangerine-wallet-browser-9fd545811226c16e11e4f2dc100a348e07f094bf.tar.gz tangerine-wallet-browser-9fd545811226c16e11e4f2dc100a348e07f094bf.tar.bz2 tangerine-wallet-browser-9fd545811226c16e11e4f2dc100a348e07f094bf.tar.lz tangerine-wallet-browser-9fd545811226c16e11e4f2dc100a348e07f094bf.tar.xz tangerine-wallet-browser-9fd545811226c16e11e4f2dc100a348e07f094bf.tar.zst tangerine-wallet-browser-9fd545811226c16e11e4f2dc100a348e07f094bf.zip |
transactions: lint fixes and reveal status-update event for balance controller
Diffstat (limited to 'app/scripts/controllers/transactions.js')
-rw-r--r-- | app/scripts/controllers/transactions.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js index de5fa5b20..1b647a4ed 100644 --- a/app/scripts/controllers/transactions.js +++ b/app/scripts/controllers/transactions.js @@ -43,7 +43,8 @@ module.exports = class TransactionController extends EventEmitter { txHistoryLimit: opts.txHistoryLimit, getNetwork: this.getNetwork.bind(this), }) - + this.store = this.txStateManager.store + this.txStateManager.on('tx:status-update', this.emit.bind(this, 'tx:status-update')) this.nonceTracker = new NonceTracker({ provider: this.provider, getPendingTransactions: this.txStateManager.getPendingTransactions.bind(this.txStateManager), @@ -69,7 +70,7 @@ module.exports = class TransactionController extends EventEmitter { getPendingTransactions: this.txStateManager.getPendingTransactions.bind(this.txStateManager), }) - this.txStateManager.store.subscribe(() => this.emit('updateBadge')) + this.txStateManager.store.subscribe(() => this.emit('update:badge')) this.pendingTxTracker.on('txWarning', this.txStateManager.updateTx.bind(this.txStateManager)) this.pendingTxTracker.on('txFailed', this.txStateManager.setTxStatusFailed.bind(this.txStateManager)) |