aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/controllers/balance.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/scripts/controllers/balance.js')
-rw-r--r--app/scripts/controllers/balance.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/app/scripts/controllers/balance.js b/app/scripts/controllers/balance.js
index 964dff0df..4fa4c78fe 100644
--- a/app/scripts/controllers/balance.js
+++ b/app/scripts/controllers/balance.js
@@ -33,9 +33,18 @@ class BalanceController {
_registerUpdates () {
const update = this.updateBalance.bind(this)
- this.txController.on('submitted', update)
- this.txController.on('confirmed', update)
- this.txController.on('failed', update)
+
+ this.txController.on('tx:status-update', (txId, status) => {
+ switch (status) {
+ case 'submitted':
+ case 'confirmed':
+ case 'failed':
+ update()
+ return
+ default:
+ return
+ }
+ })
this.accountTracker.store.subscribe(update)
this.blockTracker.on('block', update)
}