diff options
Diffstat (limited to 'src/ts')
-rw-r--r-- | src/ts/contract_wrappers/contract_wrapper.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ts/contract_wrappers/contract_wrapper.ts b/src/ts/contract_wrappers/contract_wrapper.ts index c3495fa21..ee1c6c90d 100644 --- a/src/ts/contract_wrappers/contract_wrapper.ts +++ b/src/ts/contract_wrappers/contract_wrapper.ts @@ -14,8 +14,10 @@ export class ContractWrapper { const providerObj = this.web3Wrapper.getCurrentProvider(); c.setProvider(providerObj); - const networkId = await this.web3Wrapper.getNetworkIdIfExistsAsync(); - const artifactNetworkConfigs = _.isUndefined(networkId) ? undefined : artifact.networks[networkId]; + const networkIdIfExists = await this.web3Wrapper.getNetworkIdIfExistsAsync(); + const artifactNetworkConfigs = _.isUndefined(networkIdIfExists) ? + undefined : + artifact.networks[networkIdIfExists]; let contractAddress; if (!_.isUndefined(address)) { contractAddress = address; |