diff options
author | Fabio Berger <me@fabioberger.com> | 2018-07-04 06:36:57 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-07-04 06:36:57 +0800 |
commit | 9db0bc262ba85d7dc3b104a0c1c81f85e985acfb (patch) | |
tree | be95d044c9c3a09d30444fa6a5b4bebb809a9a37 | |
parent | f4109034656fa826e25d0d4ba8a9d5e676f6c786 (diff) | |
download | dexon-0x-contracts-9db0bc262ba85d7dc3b104a0c1c81f85e985acfb.tar.gz dexon-0x-contracts-9db0bc262ba85d7dc3b104a0c1c81f85e985acfb.tar.zst dexon-0x-contracts-9db0bc262ba85d7dc3b104a0c1c81f85e985acfb.zip |
Fix conditional
-rw-r--r-- | packages/website/ts/blockchain.ts | 7 |
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)) { |