From cd3f685e7447c7f91cb74631051d9b1ed4428434 Mon Sep 17 00:00:00 2001 From: Andrew D'Amelio Date: Mon, 29 Mar 2021 13:33:45 -0400 Subject: [PATCH] use env networkId --- .../src/components/ConnectAccount/connectors/index.ts | 6 ++++-- packages/augur-comps/src/stores/constants.ts | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/augur-comps/src/components/ConnectAccount/connectors/index.ts b/packages/augur-comps/src/components/ConnectAccount/connectors/index.ts index 7aea155b8e8..7bfd6172fd4 100644 --- a/packages/augur-comps/src/components/ConnectAccount/connectors/index.ts +++ b/packages/augur-comps/src/components/ConnectAccount/connectors/index.ts @@ -7,19 +7,21 @@ import { PortisConnector } from '@web3-react/portis-connector' import { FortmaticConnector } from './Fortmatic' import { NetworkConnector } from './NetworkConnector' import { ChainId } from '@uniswap/sdk' +import { PARA_CONFIG } from '../../../stores/constants'; +const networkId = PARA_CONFIG.networkId; const PORTIS_ID = 'ede221f9-710f-44c9-a429-ed28bbb54376' const FORTMATIC_API_KEY = 'pk_live_8001A50CCA35D8CB' const FORTMATIC_API_TEST_KEY = 'pk_test_5185BE42CA372148' let FORMATIC_KEY = FORTMATIC_API_TEST_KEY -export const NETWORK_CHAIN_ID: number = process.env.CHAIN_ID ? parseInt(process.env.CHAIN_ID) : ChainId.KOVAN +export const NETWORK_CHAIN_ID: number = networkId ? parseInt(networkId) : ChainId.KOVAN if (NETWORK_CHAIN_ID === ChainId.MAINNET) { FORMATIC_KEY = FORTMATIC_API_KEY } -const NETWORK_URL = process.env.REACT_APP_NETWORK_URL || NETWORK_CHAIN_ID === ChainId.MAINNET +const NETWORK_URL = NETWORK_CHAIN_ID === ChainId.MAINNET ? 'https://eth-mainnet.alchemyapi.io/v2/Kd37_uEmJGwU6pYq6jrXaJXXi8u9IoOM' : 'https://eth-kovan.alchemyapi.io/v2/Kd37_uEmJGwU6pYq6jrXaJXXi8u9IoOM' diff --git a/packages/augur-comps/src/stores/constants.ts b/packages/augur-comps/src/stores/constants.ts index f1db3a11000..f6ec183da15 100644 --- a/packages/augur-comps/src/stores/constants.ts +++ b/packages/augur-comps/src/stores/constants.ts @@ -6,6 +6,7 @@ import { } from '../utils/types'; export const PARA_CONFIG: ParaDeploys = + // @ts-ignore ((process.env.CONFIGURATION as unknown) as ParaDeploys); export const STUBBED_GRAPH_DATA_ACTIONS = {