Commit a10b22a3 authored by Moody Salem's avatar Moody Salem

- Remove the environment variables from the netlify.toml in favor of...

- Remove the environment variables from the netlify.toml in favor of create-react-app env configuration
- Remove the polling interval override in the index.tsx which is redundant with the connectors file overrides
parent 206e8457
REACT_APP_CHAIN_ID="1"
REACT_APP_NETWORK_URL="https://mainnet.infura.io/v3/b8800ce81b8c451698081d269b86692b"
REACT_APP_PORTIS_ID=""
REACT_APP_FORTMATIC_KEY=""
REACT_APP_GOOGLE_ANALYTICS_ID="UA-128182339-4"
\ No newline at end of file
REACT_APP_NETWORK_URL="https://mainnet.infura.io/v3/b8800ce81b8c451698081d269b86692b"
\ No newline at end of file
REACT_APP_CHAIN_ID="1"
REACT_APP_NETWORK_URL="https://mainnet.infura.io/v3/2acb2baa4c06402792e0c701a3697d10"
REACT_APP_PORTIS_ID="c0e2bf01-4b08-4fd5-ac7b-8e26b58cd236"
REACT_APP_FORTMATIC_KEY="pk_live_F937DF033A1666BF"
REACT_APP_GOOGLE_ANALYTICS_ID="UA-128182339-4"
......@@ -18,12 +18,3 @@
from = "/*"
to = "/index.html"
status = 200
[build.environment]
REACT_APP_NETWORK_URL = "https://mainnet.infura.io/v3/b8800ce81b8c451698081d269b86692b"
[context.production.environment]
REACT_APP_CHAIN_ID = "1"
REACT_APP_NETWORK_URL = "https://mainnet.infura.io/v3/2acb2baa4c06402792e0c701a3697d10"
REACT_APP_FORTMATIC_KEY = "pk_live_F937DF033A1666BF"
REACT_APP_PORTIS_ID = "c0e2bf01-4b08-4fd5-ac7b-8e26b58cd236"
import { Web3Provider } from '@ethersproject/providers'
import { createWeb3ReactRoot, Web3ReactProvider } from '@web3-react/core'
import React from 'react'
import { isMobile } from 'react-device-detect'
import ReactDOM from 'react-dom'
import ReactGA from 'react-ga'
import { Web3ReactProvider, createWeb3ReactRoot } from '@web3-react/core'
import { Web3Provider } from '@ethersproject/providers'
import { Provider } from 'react-redux'
import { NetworkContextName } from './constants'
import { isMobile } from 'react-device-detect'
import WalletUpdater from './state/wallet/updater'
import './i18n'
import App from './pages/App'
import store from './state'
import ApplicationUpdater from './state/application/updater'
import TransactionUpdater from './state/transactions/updater'
import UserUpdater from './state/user/updater'
import WalletUpdater from './state/wallet/updater'
import ThemeProvider, { FixedGlobalStyle, ThemedGlobalStyle } from './theme'
import './i18n'
const Web3ProviderNetwork = createWeb3ReactRoot(NetworkContextName)
function getLibrary(provider): Web3Provider {
const library = new Web3Provider(provider)
library.pollingInterval = 10000
return library
function getLibrary(provider: any): Web3Provider {
return new Web3Provider(provider)
}
if (process.env.NODE_ENV === 'production') {
ReactGA.initialize(process.env.REACT_APP_GOOGLE_ANALYTICS_ID)
const GOOGLE_ANALYTICS_ID: string | undefined = process.env.REACT_APP_GOOGLE_ANALYTICS_ID
if (typeof GOOGLE_ANALYTICS_ID === 'string') {
ReactGA.initialize(GOOGLE_ANALYTICS_ID)
ReactGA.set({
customBrowserType: !isMobile ? 'desktop' : 'web3' in window || 'ethereum' in window ? 'mobileWeb3' : 'mobileRegular'
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment