1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Merge pull request #2191 from MetaMask/direct-block-tracker

Fix for direct use of eth-block-tracker
This commit is contained in:
Dan Finlay 2017-09-27 14:22:41 -07:00 committed by GitHub
commit 87458dae24
3 changed files with 6 additions and 8 deletions

View File

@ -11,7 +11,6 @@ const async = require('async')
const EthQuery = require('eth-query')
const ObservableStore = require('obs-store')
const EventEmitter = require('events').EventEmitter
const ethUtil = require('ethereumjs-util')
function noop () {}
@ -58,9 +57,8 @@ class AccountTracker extends EventEmitter {
//
_updateForBlock (block) {
const blockNumber = '0x' + block.number.toString('hex')
this._currentBlockNumber = blockNumber
const currentBlockGasLimit = ethUtil.addHexPrefix(block.gasLimit.toString())
this._currentBlockNumber = block.number
const currentBlockGasLimit = block.gasLimit
this.store.updateState({ currentBlockGasLimit })