aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/web3_wrapper.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-01-30 18:15:36 +0800
committerFabio Berger <me@fabioberger.com>2018-01-30 18:15:36 +0800
commitc0facfc28f65495a52f9405613fe4a08aff5d164 (patch)
treea216ce9f7464296293554aa37138d8d33ff945ad /packages/website/ts/web3_wrapper.ts
parentbb0cedd2de44a0b6533df37133ae6f576ee84b2a (diff)
downloaddexon-sol-tools-c0facfc28f65495a52f9405613fe4a08aff5d164.tar.gz
dexon-sol-tools-c0facfc28f65495a52f9405613fe4a08aff5d164.tar.zst
dexon-sol-tools-c0facfc28f65495a52f9405613fe4a08aff5d164.zip
Call destroy ealier so that web3Wrapper stops polling for userAddress/networkId updates before we prep for the batchDispatch
Diffstat (limited to 'packages/website/ts/web3_wrapper.ts')
-rw-r--r--packages/website/ts/web3_wrapper.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/website/ts/web3_wrapper.ts b/packages/website/ts/web3_wrapper.ts
index 00b18a266..1e2f8ff5d 100644
--- a/packages/website/ts/web3_wrapper.ts
+++ b/packages/website/ts/web3_wrapper.ts
@@ -150,6 +150,8 @@ export class Web3Wrapper {
}
}
private _stopEmittingNetworkConnectionAndUserBalanceStateAsync() {
- intervalUtils.clearAsyncExcludingInterval(this._watchNetworkAndBalanceIntervalId);
+ if (!_.isUndefined(this._watchNetworkAndBalanceIntervalId)) {
+ intervalUtils.clearAsyncExcludingInterval(this._watchNetworkAndBalanceIntervalId);
+ }
}
}