diff --git a/.env.example b/.env.example index 50b8893..872df3f 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1,3 @@ REACT_APP_DAPP_ID= -REACT_APP_NETWORK=testnet \ No newline at end of file +REACT_APP_NETWORK=testnet +REACT_APP_INFURA_KEY= \ No newline at end of file diff --git a/src/services/evm.ts b/src/services/evm.ts index 791a1e9..9b4631f 100644 --- a/src/services/evm.ts +++ b/src/services/evm.ts @@ -17,7 +17,9 @@ export const supportedChains = [ { name: "Ethereum Mainnet", chainId: "0x1", - rpcUrls: ["https://mainnet.infura.io/v3/ef5a5728e2354955b562d2ffa4ae5305"], + rpcUrls: [ + `https://mainnet.infura.io/v3/${process.env.REACT_APP_INFURA_KEY}`, + ], environment: "mainnet", }, { @@ -100,7 +102,7 @@ const bloctoSDK = new BloctoSDK({ chainId: isMainnet ? "0x1" : "0x5", // (required for Ethereum) JSON RPC endpoint rpc: isMainnet - ? "https://mainnet.infura.io/v3/ef5a5728e2354955b562d2ffa4ae5305" + ? `https://mainnet.infura.io/v3/${process.env.REACT_APP_INFURA_KEY}` : "https://rpc.ankr.com/eth_goerli", }, appId: process.env.REACT_APP_DAPP_ID,