aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/blockchain.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-07-04 06:36:57 +0800
committerFabio Berger <me@fabioberger.com>2018-07-04 06:36:57 +0800
commit9db0bc262ba85d7dc3b104a0c1c81f85e985acfb (patch)
treebe95d044c9c3a09d30444fa6a5b4bebb809a9a37 /packages/website/ts/blockchain.ts
parentf4109034656fa826e25d0d4ba8a9d5e676f6c786 (diff)
downloaddexon-sol-tools-9db0bc262ba85d7dc3b104a0c1c81f85e985acfb.tar
dexon-sol-tools-9db0bc262ba85d7dc3b104a0c1c81f85e985acfb.tar.gz
dexon-sol-tools-9db0bc262ba85d7dc3b104a0c1c81f85e985acfb.tar.bz2
dexon-sol-tools-9db0bc262ba85d7dc3b104a0c1c81f85e985acfb.tar.lz
dexon-sol-tools-9db0bc262ba85d7dc3b104a0c1c81f85e985acfb.tar.xz
dexon-sol-tools-9db0bc262ba85d7dc3b104a0c1c81f85e985acfb.tar.zst
dexon-sol-tools-9db0bc262ba85d7dc3b104a0c1c81f85e985acfb.zip
Fix conditional
Diffstat (limited to 'packages/website/ts/blockchain.ts')
-rw-r--r--packages/website/ts/blockchain.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts
index 8f1b33aeb..eb2cba268 100644
--- a/packages/website/ts/blockchain.ts
+++ b/packages/website/ts/blockchain.ts
@@ -102,9 +102,9 @@ export class Blockchain {
// Our core assumptions about the injected web3 object is that it has the following
// properties and methods.
if (
- !_.isUndefined(injectedWeb3IfExists.version) &&
- !_.isUndefined(injectedWeb3IfExists.version.getNetwork) &&
- !_.isUndefined(injectedWeb3IfExists.currentProvider)
+ _.isUndefined(injectedWeb3IfExists.version) ||
+ _.isUndefined(injectedWeb3IfExists.version.getNetwork) ||
+ _.isUndefined(injectedWeb3IfExists.currentProvider)
) {
return undefined;
}
@@ -787,6 +787,7 @@ export class Blockchain {
const networkIdIfExists = await Blockchain._getInjectedWeb3ProviderNetworkIdIfExistsAsync();
this.networkId = !_.isUndefined(networkIdIfExists) ? networkIdIfExists : constants.NETWORK_ID_MAINNET;
const injectedWeb3IfExists = Blockchain._getInjectedWeb3();
+ console.log(injectedWeb3IfExists);
if (!_.isUndefined(injectedWeb3IfExists) && !_.isUndefined(injectedWeb3IfExists.currentProvider)) {
const injectedProviderObservable = injectedWeb3IfExists.currentProvider.publicConfigStore;
if (!_.isUndefined(injectedProviderObservable) && _.isUndefined(this._injectedProviderObservable)) {