Skip to content

Commit

Permalink
Merge pull request #10939 from AugurProject/fix-ConnectAccount-networ…
Browse files Browse the repository at this point in the history
…kUsed

use env networkId
  • Loading branch information
JohnDanz authored Mar 29, 2021
2 parents 4536148 + cd3f685 commit 23dcd4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
1 change: 1 addition & 0 deletions packages/augur-comps/src/stores/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 23dcd4f

Please sign in to comment.