From 764545c9e77a15233757840a75951a2f5a0a2298 Mon Sep 17 00:00:00 2001 From: greypixel Date: Wed, 27 Mar 2024 20:49:55 +0000 Subject: [PATCH] Revert switch to local rpc --- src/main.tsx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) 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: {