aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/blockchain_watcher.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon@0xproject.com>2018-07-04 02:19:52 +0800
committerGitHub <noreply@github.com>2018-07-04 02:19:52 +0800
commit9b864517e2402d766b285098040787c62dfcd99d (patch)
treefe1bd94b9ab6e593f247dcf168296115a3f45ce5 /packages/website/ts/blockchain_watcher.ts
parenta858e2870b0aa3fee46159f4b58981c513bbf8b8 (diff)
parent2d30c290e9d5420ef6ec9b622ebddf3995239ebc (diff)
downloaddexon-sol-tools-9b864517e2402d766b285098040787c62dfcd99d.tar
dexon-sol-tools-9b864517e2402d766b285098040787c62dfcd99d.tar.gz
dexon-sol-tools-9b864517e2402d766b285098040787c62dfcd99d.tar.bz2
dexon-sol-tools-9b864517e2402d766b285098040787c62dfcd99d.tar.lz
dexon-sol-tools-9b864517e2402d766b285098040787c62dfcd99d.tar.xz
dexon-sol-tools-9b864517e2402d766b285098040787c62dfcd99d.tar.zst
dexon-sol-tools-9b864517e2402d766b285098040787c62dfcd99d.zip
Merge pull request #799 from 0xProject/feature/website/wallet-menu
Add menu for at the top of wallet and top right component
Diffstat (limited to 'packages/website/ts/blockchain_watcher.ts')
-rw-r--r--packages/website/ts/blockchain_watcher.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/website/ts/blockchain_watcher.ts b/packages/website/ts/blockchain_watcher.ts
index df5f73fd1..4b23aa98a 100644
--- a/packages/website/ts/blockchain_watcher.ts
+++ b/packages/website/ts/blockchain_watcher.ts
@@ -10,6 +10,7 @@ export class BlockchainWatcher {
private _watchBalanceIntervalId: NodeJS.Timer;
private _prevUserEtherBalanceInWei?: BigNumber;
private _prevUserAddressIfExists: string;
+ private _prevNodeVersionIfExists: string;
constructor(dispatcher: Dispatcher, web3Wrapper: Web3Wrapper, shouldPollUserAddress: boolean) {
this._dispatcher = dispatcher;
this._shouldPollUserAddress = shouldPollUserAddress;
@@ -43,11 +44,9 @@ export class BlockchainWatcher {
);
}
private async _updateBalanceAsync(): Promise<void> {
- let prevNodeVersion: string;
- // Check for node version changes
const currentNodeVersion = await this._web3Wrapper.getNodeVersionAsync();
- if (currentNodeVersion !== prevNodeVersion) {
- prevNodeVersion = currentNodeVersion;
+ if (this._prevNodeVersionIfExists !== currentNodeVersion) {
+ this._prevNodeVersionIfExists = currentNodeVersion;
this._dispatcher.updateNodeVersion(currentNodeVersion);
}