diff --git a/src/main.tsx b/src/main.tsx index a9c68c0..3d01418 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -12,12 +12,14 @@ import { CoinbaseWalletConnector } from "wagmi/connectors/coinbaseWallet"; import { InjectedConnector } from "wagmi/connectors/injected"; import { MetaMaskConnector } from "wagmi/connectors/metaMask"; import { WalletConnectConnector } from "wagmi/connectors/walletConnect"; -import { jsonRpcProvider } from "wagmi/providers/jsonRpc"; import App from "./App.tsx"; import AirSwapLogo from "./assets/airswap-logo.svg"; import "./index.css"; import { isPlainObject } from "./utils/isPlainObject.ts"; +import { infuraProvider } from "wagmi/providers/infura"; +import { publicProvider } from "wagmi/providers/public"; + // Fonts: import "@fontsource/dm-mono/400.css"; import "@fontsource/dm-mono/500.css"; @@ -30,13 +32,14 @@ if (!window.Buffer) { const { chains, publicClient, webSocketPublicClient } = configureChains( [mainnet, goerli, avalanche, bsc, polygon], [ - jsonRpcProvider({ - rpc: () => ({ - http: "http://localhost:8545", - }), - }), - // infuraProvider({ apiKey: import.meta.env.VITE_INFURA_API_KEY || "" }), - // publicProvider(), + // uncomment to use local node. + // jsonRpcProvider({ + // rpc: () => ({ + // http: "http://localhost:8545", + // }), + // }), + infuraProvider({ apiKey: import.meta.env.VITE_INFURA_API_KEY || "" }), + publicProvider(), ], { batch: {