mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge pull request #5240 from MetaMask/i5238-account-balance-update
Ensure account-tracker currentBlockNumber is set on first block update.
This commit is contained in:
commit
ce1975fbb4
@ -45,6 +45,9 @@ class AccountTracker {
|
||||
this._blockTracker = opts.blockTracker
|
||||
// blockTracker.currentBlock may be null
|
||||
this._currentBlockNumber = this._blockTracker.getCurrentBlock()
|
||||
this._blockTracker.once('latest', blockNumber => {
|
||||
this._currentBlockNumber = blockNumber
|
||||
})
|
||||
// bind function for easier listener syntax
|
||||
this._updateForBlock = this._updateForBlock.bind(this)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user