aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-05-17 15:13:20 +0800
committerkumavis <aaron@kumavis.me>2018-05-17 15:13:20 +0800
commit3084dc47d10e3e455c924e5aad0b0961c500ec8d (patch)
tree0e730af75fba88cf4e86b275311ad7911ca0da1f /app
parenteaa5a48c918b6d647c9dc75d8769a5e0ff6c42bb (diff)
downloadtangerine-wallet-browser-3084dc47d10e3e455c924e5aad0b0961c500ec8d.tar
tangerine-wallet-browser-3084dc47d10e3e455c924e5aad0b0961c500ec8d.tar.gz
tangerine-wallet-browser-3084dc47d10e3e455c924e5aad0b0961c500ec8d.tar.bz2
tangerine-wallet-browser-3084dc47d10e3e455c924e5aad0b0961c500ec8d.tar.lz
tangerine-wallet-browser-3084dc47d10e3e455c924e5aad0b0961c500ec8d.tar.xz
tangerine-wallet-browser-3084dc47d10e3e455c924e5aad0b0961c500ec8d.tar.zst
tangerine-wallet-browser-3084dc47d10e3e455c924e5aad0b0961c500ec8d.zip
recent-blocks - fix backfill blockNumber tracking
Diffstat (limited to 'app')
-rw-r--r--app/scripts/controllers/recent-blocks.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/scripts/controllers/recent-blocks.js b/app/scripts/controllers/recent-blocks.js
index 28eba0f26..9a215d0e5 100644
--- a/app/scripts/controllers/recent-blocks.js
+++ b/app/scripts/controllers/recent-blocks.js
@@ -1,6 +1,5 @@
const ObservableStore = require('obs-store')
const extend = require('xtend')
-const BN = require('ethereumjs-util').BN
const EthQuery = require('eth-query')
const log = require('loglevel')
const pify = require('pify')
@@ -125,7 +124,7 @@ class RecentBlocksController {
async backfill() {
this.blockTracker.once('latest', async (blockNumberHex) => {
let recentBlocks
- const blockNumber = Number.parseInt(blockNumberHex, 16)
+ let blockNumber = Number.parseInt(blockNumberHex, 16)
let state = this.store.getState()
recentBlocks = state.recentBlocks
@@ -136,7 +135,7 @@ class RecentBlocksController {
if (newBlock) {
this.backfillBlock(newBlock)
- blockNum = newBlock.number
+ blockNumber = Number.parseInt(newBlock.number, 16)
}
state = this.store.getState()