diff --git a/packages/react-app/.sample.env b/packages/react-app/.sample.env index d3a3875..06fa770 100644 --- a/packages/react-app/.sample.env +++ b/packages/react-app/.sample.env @@ -1,4 +1,5 @@ REACT_APP_INFURA_ID=INFURA-PROJECT-ID -REACT_APP_PROVIDER=https://rinkeby.infura.io/v3/INFURA-PROJECT-ID +REACT_APP_RINKEBY_PROVIDER=https://rinkeby.infura.io/v3/INFURA-PROJECT-ID REACT_APP_ETHERSCAN_ID=YOUR Etherscan API key token -REACT_APP_MAINNET_RPC_ENDPOINT=https://eth-mainnet.alchemyapi.io/v2/ALCHEMY-ID \ No newline at end of file +REACT_APP_MAINNET_RPC_ENDPOINT=https://eth-mainnet.alchemyapi.io/v2/ALCHEMY-ID +REACT_APP_NETWORK=rinkeby \ No newline at end of file diff --git a/packages/react-app/src/App.jsx b/packages/react-app/src/App.jsx index e6cb3e8..fe29220 100644 --- a/packages/react-app/src/App.jsx +++ b/packages/react-app/src/App.jsx @@ -52,8 +52,8 @@ const mainnetInfura = navigator.onLine // 🏠 Your local provider is usually pointed at your local blockchain const localProviderUrl = targetNetwork.rpcUrl; -// as you deploy to other networks you can set REACT_APP_PROVIDER=https://dai.poa.network in packages/react-app/.env -const localProviderUrlFromEnv = process.env.REACT_APP_PROVIDER ? process.env.REACT_APP_PROVIDER : localProviderUrl; +// as you deploy to other networks you can set REACT_APP_RINKEBY_PROVIDER=https://dai.poa.network in packages/react-app/.env +const localProviderUrlFromEnv = process.env.REACT_APP_RINKEBY_PROVIDER ? process.env.REACT_APP_RINKEBY_PROVIDER : localProviderUrl; if (DEBUG) console.log("🏠 Connecting to provider:", localProviderUrlFromEnv); const localProvider = new ethers.providers.StaticJsonRpcProvider(localProviderUrlFromEnv);