1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00

Fix bug where block gas limit was incorrectly parsed.

This commit is contained in:
Dan Finlay 2017-09-27 12:09:32 -07:00
parent 52976d6edc
commit 8d3fec42d0
2 changed files with 5 additions and 1 deletions

View File

@ -2,6 +2,8 @@
## Current Master
- Fix block gas limit estimation.
## 3.10.4 2017-9-27
- Fix bug that could mis-render token balances when very small. (Not actually included in 3.9.9)

View File

@ -11,6 +11,7 @@ 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 () {}
@ -59,8 +60,9 @@ class AccountTracker extends EventEmitter {
_updateForBlock (block) {
const blockNumber = '0x' + block.number.toString('hex')
this._currentBlockNumber = blockNumber
const currentBlockGasLimit = ethUtil.addHexPrefix(block.gasLimit.toString())
this.store.updateState({ currentBlockGasLimit: `0x${block.gasLimit.toString('hex')}` })
this.store.updateState({ currentBlockGasLimit })
async.parallel([
this._updateAccounts.bind(this),