diff options
author | Dan Finlay <542863+danfinlay@users.noreply.github.com> | 2018-09-12 05:31:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 05:31:10 +0800 |
commit | ce1975fbb4f36c83e64948968612b0c74a0b39b8 (patch) | |
tree | f7a9bc1980cc81a0f658ff23b7e3f88427fa98f7 /app/scripts | |
parent | 23c646c8ce8a2cd22895b162dcdd0e17fa1c127f (diff) | |
parent | eb32ccb0c77c6e480c93f02c29faafec3cd93ec0 (diff) | |
download | tangerine-wallet-browser-ce1975fbb4f36c83e64948968612b0c74a0b39b8.tar tangerine-wallet-browser-ce1975fbb4f36c83e64948968612b0c74a0b39b8.tar.gz tangerine-wallet-browser-ce1975fbb4f36c83e64948968612b0c74a0b39b8.tar.bz2 tangerine-wallet-browser-ce1975fbb4f36c83e64948968612b0c74a0b39b8.tar.lz tangerine-wallet-browser-ce1975fbb4f36c83e64948968612b0c74a0b39b8.tar.xz tangerine-wallet-browser-ce1975fbb4f36c83e64948968612b0c74a0b39b8.tar.zst tangerine-wallet-browser-ce1975fbb4f36c83e64948968612b0c74a0b39b8.zip |
Merge pull request #5240 from MetaMask/i5238-account-balance-update
Ensure account-tracker currentBlockNumber is set on first block update.
Diffstat (limited to 'app/scripts')
-rw-r--r-- | app/scripts/lib/account-tracker.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/scripts/lib/account-tracker.js b/app/scripts/lib/account-tracker.js index 3a52d5e8d..2e9340018 100644 --- a/app/scripts/lib/account-tracker.js +++ b/app/scripts/lib/account-tracker.js @@ -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) } |