From 657dc785ea0d0010f3186a820604441d12f91808 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 11 May 2018 15:23:50 +0200 Subject: Get networkId from web3Wrapper --- packages/fill-scenarios/src/constants.ts | 1 - packages/fill-scenarios/src/index.ts | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'packages') diff --git a/packages/fill-scenarios/src/constants.ts b/packages/fill-scenarios/src/constants.ts index 0cd3d607a..ec2fe744a 100644 --- a/packages/fill-scenarios/src/constants.ts +++ b/packages/fill-scenarios/src/constants.ts @@ -1,4 +1,3 @@ export const constants = { NULL_ADDRESS: '0x0000000000000000000000000000000000000000', - TEST_RPC_NETWORK_ID: 50, }; diff --git a/packages/fill-scenarios/src/index.ts b/packages/fill-scenarios/src/index.ts index 0c62ef410..8c7fa500e 100644 --- a/packages/fill-scenarios/src/index.ts +++ b/packages/fill-scenarios/src/index.ts @@ -234,9 +234,10 @@ export class FillScenarios { this._web3Wrapper.getProvider(), this._web3Wrapper.getContractDefaults(), ); - const networkArtifactsIfExists = artifacts.TokenTransferProxy.networks[constants.TEST_RPC_NETWORK_ID]; + const networkId = await this._web3Wrapper.getNetworkIdAsync(); + const networkArtifactsIfExists = artifacts.TokenTransferProxy.networks[networkId]; if (_.isUndefined(networkArtifactsIfExists)) { - throw new Error(`Did not find network artifacts for networkId: ${constants.TEST_RPC_NETWORK_ID}`); + throw new Error(`Did not find network artifacts for networkId: ${networkId}`); } const proxyAddress = networkArtifactsIfExists.address; const oldMakerAllowance = await tokenInstance.allowance.callAsync(address, proxyAddress); -- cgit v1.2.3