Skip to content

Commit 2de836f

Browse files
committed
fix: fix provider
1 parent 0c57e6b commit 2de836f

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

web/src/context/Web3Provider.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
import React from "react";
2-
import {
3-
EthereumClient,
4-
w3mConnectors,
5-
w3mProvider,
6-
} from "@web3modal/ethereum";
2+
import { EthereumClient, w3mConnectors } from "@web3modal/ethereum";
73
import { Web3Modal } from "@web3modal/react";
84
import { configureChains, createConfig, WagmiConfig } from "wagmi";
95
import { arbitrumGoerli, gnosisChiado } from "wagmi/chains";
6+
import { publicProvider } from "wagmi/providers/public";
7+
import { alchemyProvider } from "wagmi/dist/providers/alchemy";
108

119
const chains = [arbitrumGoerli, gnosisChiado];
1210
const projectId = "6efaa26765fa742153baf9281e218217";
1311

14-
const { publicClient } = configureChains(chains, [w3mProvider({ projectId })]);
12+
const { publicClient } = configureChains(chains, [alchemyProvider({ apiKey: "" }), publicProvider()]);
1513

1614
const wagmiConfig = createConfig({
1715
autoConnect: false,
@@ -21,9 +19,7 @@ const wagmiConfig = createConfig({
2119

2220
const ethereumClient = new EthereumClient(wagmiConfig, chains);
2321

24-
const Web3Provider: React.FC<{ children: React.ReactNode }> = ({
25-
children,
26-
}) => (
22+
const Web3Provider: React.FC<{ children: React.ReactNode }> = ({ children }) => (
2723
<>
2824
<WagmiConfig config={wagmiConfig}> {children} </WagmiConfig>
2925
<Web3Modal {...{ projectId, ethereumClient }} />

0 commit comments

Comments
 (0)