diff --git a/lib/client/constants.ts b/lib/client/constants.ts index 64613a31..30526369 100644 --- a/lib/client/constants.ts +++ b/lib/client/constants.ts @@ -148,6 +148,8 @@ export const getAPIKeyForNetwork: Map = new Map([ [ChainInfo.MUMBAI.id, process.env.NEXT_PUBLIC_ALCHEMY_MUMBAI_KEY], ]); +export const ALCHEMY_PUBLIC_RPC = "https://eth-mainnet.g.alchemy.com/v2/demo"; + export const getCurrentNetworkHttpUrl = (chainId: number) => { const httpUrl = getRpcHttpUrlForNetwork.get(chainId); diff --git a/lib/wallet/wallet-config.ts b/lib/wallet/wallet-config.ts index 3c45b12d..f34d9b05 100644 --- a/lib/wallet/wallet-config.ts +++ b/lib/wallet/wallet-config.ts @@ -1,4 +1,7 @@ -import { getCurrentNetworkHttpUrl } from "../client/constants"; +import { + ALCHEMY_PUBLIC_RPC, + getCurrentNetworkHttpUrl, +} from "../client/constants"; import { sepolia } from "@wagmi/core/chains"; import { configureChains, createConfig } from "wagmi"; import { @@ -17,7 +20,7 @@ export const { chains, webSocketPublicClient, publicClient } = configureChains( [ jsonRpcProvider({ rpc: (chain) => ({ - http: getCurrentNetworkHttpUrl(chain.id), + http: getCurrentNetworkHttpUrl(chain.id) || ALCHEMY_PUBLIC_RPC, }), }), ],