rename networkId to networkIdIfExists
This commit is contained in:
parent
a4ec739ce6
commit
066c7ff0aa
@ -14,8 +14,10 @@ export class ContractWrapper {
|
|||||||
const providerObj = this.web3Wrapper.getCurrentProvider();
|
const providerObj = this.web3Wrapper.getCurrentProvider();
|
||||||
c.setProvider(providerObj);
|
c.setProvider(providerObj);
|
||||||
|
|
||||||
const networkId = await this.web3Wrapper.getNetworkIdIfExistsAsync();
|
const networkIdIfExists = await this.web3Wrapper.getNetworkIdIfExistsAsync();
|
||||||
const artifactNetworkConfigs = _.isUndefined(networkId) ? undefined : artifact.networks[networkId];
|
const artifactNetworkConfigs = _.isUndefined(networkIdIfExists) ?
|
||||||
|
undefined :
|
||||||
|
artifact.networks[networkIdIfExists];
|
||||||
let contractAddress;
|
let contractAddress;
|
||||||
if (!_.isUndefined(address)) {
|
if (!_.isUndefined(address)) {
|
||||||
contractAddress = address;
|
contractAddress = address;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user