aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-05-24 13:46:20 +0800
committerkumavis <aaron@kumavis.me>2018-05-24 13:46:20 +0800
commitee800de025397af7958d8e8e382b31b1d09c338c (patch)
tree4ad2a1a03966f32d4d2d2797b25e433afafa49ee /app/scripts
parentdc96b1eb935e59b12bcdc00fc68058684a376bd8 (diff)
downloadtangerine-wallet-browser-ee800de025397af7958d8e8e382b31b1d09c338c.tar
tangerine-wallet-browser-ee800de025397af7958d8e8e382b31b1d09c338c.tar.gz
tangerine-wallet-browser-ee800de025397af7958d8e8e382b31b1d09c338c.tar.bz2
tangerine-wallet-browser-ee800de025397af7958d8e8e382b31b1d09c338c.tar.lz
tangerine-wallet-browser-ee800de025397af7958d8e8e382b31b1d09c338c.tar.xz
tangerine-wallet-browser-ee800de025397af7958d8e8e382b31b1d09c338c.tar.zst
tangerine-wallet-browser-ee800de025397af7958d8e8e382b31b1d09c338c.zip
controllers - recent-blocks - wrap block-tracker event in try-catch
Diffstat (limited to 'app/scripts')
-rw-r--r--app/scripts/controllers/recent-blocks.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/scripts/controllers/recent-blocks.js b/app/scripts/controllers/recent-blocks.js
index 215638666..e256c62e0 100644
--- a/app/scripts/controllers/recent-blocks.js
+++ b/app/scripts/controllers/recent-blocks.js
@@ -34,7 +34,13 @@ class RecentBlocksController {
}, opts.initState)
this.store = new ObservableStore(initState)
- this.blockTracker.on('latest', this.processBlock.bind(this))
+ this.blockTracker.on('latest', async (newBlockNumberHex) => {
+ try {
+ await this.processBlock(newBlockNumberHex)
+ } catch (err) {
+ log.error(err)
+ }
+ })
this.backfill()
}