aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/blockchain.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-06-19 09:00:32 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-06-19 09:01:38 +0800
commit3b73a0e26908a5c147cd377efb3dbe64b6febed4 (patch)
tree0dfe5396a2c4ece31403b7e543876e6899226e8e /packages/website/ts/blockchain.ts
parent0bfcf79e79b762a9fb98e90b8e6310c781cfae97 (diff)
downloaddexon-sol-tools-3b73a0e26908a5c147cd377efb3dbe64b6febed4.tar
dexon-sol-tools-3b73a0e26908a5c147cd377efb3dbe64b6febed4.tar.gz
dexon-sol-tools-3b73a0e26908a5c147cd377efb3dbe64b6febed4.tar.bz2
dexon-sol-tools-3b73a0e26908a5c147cd377efb3dbe64b6febed4.tar.lz
dexon-sol-tools-3b73a0e26908a5c147cd377efb3dbe64b6febed4.tar.xz
dexon-sol-tools-3b73a0e26908a5c147cd377efb3dbe64b6febed4.tar.zst
dexon-sol-tools-3b73a0e26908a5c147cd377efb3dbe64b6febed4.zip
Check network state immediately instead of waiting for delay
Diffstat (limited to 'packages/website/ts/blockchain.ts')
-rw-r--r--packages/website/ts/blockchain.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts
index 3ebdd1dee..46a4d6629 100644
--- a/packages/website/ts/blockchain.ts
+++ b/packages/website/ts/blockchain.ts
@@ -229,7 +229,7 @@ export class Blockchain {
shouldPollUserAddress,
);
this._contractWrappers.setProvider(provider, this.networkId);
- this._blockchainWatcher.startEmittingNetworkConnectionAndUserBalanceState();
+ await this._blockchainWatcher.startEmittingNetworkConnectionAndUserBalanceStateAsync();
this._dispatcher.updateProviderType(ProviderType.Ledger);
}
public async updateProviderToInjectedAsync(): Promise<void> {
@@ -259,7 +259,7 @@ export class Blockchain {
this._contractWrappers.setProvider(provider, this.networkId);
await this.fetchTokenInformationAsync();
- this._blockchainWatcher.startEmittingNetworkConnectionAndUserBalanceState();
+ await this._blockchainWatcher.startEmittingNetworkConnectionAndUserBalanceStateAsync();
this._dispatcher.updateProviderType(ProviderType.Injected);
delete this._ledgerSubprovider;
delete this._cachedProvider;
@@ -816,7 +816,7 @@ export class Blockchain {
this._userAddressIfExists = userAddresses[0];
this._dispatcher.updateUserAddress(this._userAddressIfExists);
await this.fetchTokenInformationAsync();
- this._blockchainWatcher.startEmittingNetworkConnectionAndUserBalanceState();
+ await this._blockchainWatcher.startEmittingNetworkConnectionAndUserBalanceStateAsync();
await this._rehydrateStoreWithContractEventsAsync();
}
private _updateProviderName(injectedWeb3: Web3): void {