diff options
author | Dan Finlay <dan@danfinlay.com> | 2017-09-28 03:09:32 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2017-09-28 03:09:32 +0800 |
commit | 8d3fec42d0a49c2e0fe7ef3dc504533deb223d95 (patch) | |
tree | 3e3a910096a77c539af39ce22c652e52d3efed90 | |
parent | 52976d6edc4b69add7c08b1eab77dd18a5a9fdd4 (diff) | |
download | tangerine-wallet-browser-8d3fec42d0a49c2e0fe7ef3dc504533deb223d95.tar tangerine-wallet-browser-8d3fec42d0a49c2e0fe7ef3dc504533deb223d95.tar.gz tangerine-wallet-browser-8d3fec42d0a49c2e0fe7ef3dc504533deb223d95.tar.bz2 tangerine-wallet-browser-8d3fec42d0a49c2e0fe7ef3dc504533deb223d95.tar.lz tangerine-wallet-browser-8d3fec42d0a49c2e0fe7ef3dc504533deb223d95.tar.xz tangerine-wallet-browser-8d3fec42d0a49c2e0fe7ef3dc504533deb223d95.tar.zst tangerine-wallet-browser-8d3fec42d0a49c2e0fe7ef3dc504533deb223d95.zip |
Fix bug where block gas limit was incorrectly parsed.
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | app/scripts/lib/account-tracker.js | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index eedfa89c5..4898d27fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/app/scripts/lib/account-tracker.js b/app/scripts/lib/account-tracker.js index e2892b1ce..07fc32b10 100644 --- a/app/scripts/lib/account-tracker.js +++ b/app/scripts/lib/account-tracker.js @@ -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), |