aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/blockchain.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts/blockchain.ts')
-rw-r--r--packages/website/ts/blockchain.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts
index 4a041d20c..18363a4c7 100644
--- a/packages/website/ts/blockchain.ts
+++ b/packages/website/ts/blockchain.ts
@@ -773,9 +773,9 @@ export class Blockchain {
const networkIdIfExists = await Blockchain._getInjectedWeb3ProviderNetworkIdIfExistsAsync();
this.networkId = !_.isUndefined(networkIdIfExists) ? networkIdIfExists : constants.NETWORK_ID_MAINNET;
const injectedWeb3IfExists = Blockchain._getInjectedWeb3();
- if (injectedWeb3IfExists) {
+ if (!_.isUndefined(injectedWeb3IfExists) && !_.isUndefined(injectedWeb3IfExists.currentProvider)) {
const injectedProviderObservable = injectedWeb3IfExists.currentProvider.publicConfigStore;
- if (injectedProviderObservable && !this._injectedProviderObservable) {
+ if (!_.isUndefined(injectedProviderObservable) && _.isUndefined(this._injectedProviderObservable)) {
this._injectedProviderObservable = injectedProviderObservable;
this._injectedProviderObservable.subscribe(this._injectedProviderUpdateHandler);
}
@@ -790,7 +790,9 @@ export class Blockchain {
shouldPollUserAddress: boolean = false,
shouldUserLedgerProvider: boolean = false,
): Promise<void> {
- this._dispatcher.updateBlockchainIsLoaded(false);
+ if (!shouldUserLedgerProvider) {
+ this._dispatcher.updateBlockchainIsLoaded(false);
+ }
this._dispatcher.updateUserWeiBalance(undefined);
this.networkId = networkId;
const injectedWeb3IfExists = Blockchain._getInjectedWeb3();