diff options
author | Fabio Berger <me@fabioberger.com> | 2018-05-11 21:23:50 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-05-11 21:23:50 +0800 |
commit | 657dc785ea0d0010f3186a820604441d12f91808 (patch) | |
tree | 8f7e149686df3f741a81cfc549c2b4ee502a2fa1 /packages/fill-scenarios/src/index.ts | |
parent | 461e74d8be17b0a1582e7c11de01b43a45399fcc (diff) | |
download | dexon-sol-tools-657dc785ea0d0010f3186a820604441d12f91808.tar dexon-sol-tools-657dc785ea0d0010f3186a820604441d12f91808.tar.gz dexon-sol-tools-657dc785ea0d0010f3186a820604441d12f91808.tar.bz2 dexon-sol-tools-657dc785ea0d0010f3186a820604441d12f91808.tar.lz dexon-sol-tools-657dc785ea0d0010f3186a820604441d12f91808.tar.xz dexon-sol-tools-657dc785ea0d0010f3186a820604441d12f91808.tar.zst dexon-sol-tools-657dc785ea0d0010f3186a820604441d12f91808.zip |
Get networkId from web3Wrapper
Diffstat (limited to 'packages/fill-scenarios/src/index.ts')
-rw-r--r-- | packages/fill-scenarios/src/index.ts | 5 |
1 files changed, 3 insertions, 2 deletions
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); |