From 92f0f4c92da6547ce93ffdcdc9f99a7b911da472 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Fri, 2 Oct 2020 03:46:39 -0700 Subject: [PATCH 1/2] use networkID instead of chainId --- src/utils/ConfigHelper.ts | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/utils/ConfigHelper.ts b/src/utils/ConfigHelper.ts index f19208a1a..d98d787a5 100644 --- a/src/utils/ConfigHelper.ts +++ b/src/utils/ConfigHelper.ts @@ -12,13 +12,13 @@ export declare type ConfigHelperNetworkName = export declare type ConfigHelperNetworkId = 1 | 4 | number export interface ConfigHelperConfig extends Config { - chainId: ConfigHelperNetworkId + networkId: ConfigHelperNetworkId network: ConfigHelperNetworkName } const configs: ConfigHelperConfig[] = [ { - chainId: null, + networkId: null, network: 'development', nodeUri: 'http://localhost:8545', factoryAddress: null, @@ -29,7 +29,19 @@ const configs: ConfigHelperConfig[] = [ metadataContractAddress: null }, { - chainId: 4, + // barge + networkId: 8996, + network: 'development', + nodeUri: 'http://localhost:8545', + factoryAddress: null, + metadataStoreUri: 'http://127.0.0.1:5000', + providerUri: 'http://127.0.0.1:8030', + poolFactoryAddress: null, + fixedRateExchangeAddress: null, + metadataContractAddress: null + }, + { + networkId: 4, network: 'rinkeby', nodeUri: 'https://rinkeby.infura.io/v3', factoryAddress: '0x241D0f315d2bfe32b90282e6863AC22A309EbFa0', @@ -41,7 +53,7 @@ const configs: ConfigHelperConfig[] = [ metadataContractAddress: '0x0220D0b4FfCC4A14C7601215aA23da06d5b1c921' }, { - chainId: 1, + networkId: 1, network: 'mainnet', nodeUri: 'https://mainnet.infura.io/v3', factoryAddress: '0x1234', @@ -87,7 +99,7 @@ export class ConfigHelper { network: ConfigHelperNetworkName | ConfigHelperNetworkId, infuraProjectId?: string ): Config { - const filterBy = typeof network === 'string' ? 'network' : 'chainId' + const filterBy = typeof network === 'string' ? 'network' : 'networkId' let config = configs.find((c) => c[filterBy] === network) if (!config) { From 45f377221c7ab5fac6e56015542dc6d41feb0217 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Fri, 2 Oct 2020 03:52:01 -0700 Subject: [PATCH 2/2] use networkID instead of chainId --- src/utils/ConfigHelper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/ConfigHelper.ts b/src/utils/ConfigHelper.ts index d98d787a5..dd85c9b1a 100644 --- a/src/utils/ConfigHelper.ts +++ b/src/utils/ConfigHelper.ts @@ -19,7 +19,7 @@ export interface ConfigHelperConfig extends Config { const configs: ConfigHelperConfig[] = [ { networkId: null, - network: 'development', + network: 'unknown', nodeUri: 'http://localhost:8545', factoryAddress: null, metadataStoreUri: 'http://127.0.0.1:5000',