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

account-tracker - guard against empty block

This commit is contained in:
kumavis 2018-05-24 13:43:36 -07:00
parent 49ef93b991
commit 91accee2c6

View File

@ -130,8 +130,9 @@ class AccountTracker {
async _updateForBlock (blockNumber) {
this._currentBlockNumber = blockNumber
// this shouldn't be here...
// block gasLimit polling shouldn't be in account-tracker shouldn't be here...
const currentBlock = await this._query.getBlockByNumber(blockNumber, false)
if (!currentBlock) return
const currentBlockGasLimit = currentBlock.gasLimit
this.store.updateState({ currentBlockGasLimit })