File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -4,14 +4,23 @@ import {
44 w3mProvider ,
55} from "@web3modal/ethereum" ;
66import { Web3Modal } from "@web3modal/react" ;
7- import { supportedChains } from "config/chains" ;
7+ import { supportedChains , getChainRpc } from "config/chains" ;
88import { WagmiConfig , configureChains , createConfig } from "wagmi" ;
9+ import { jsonRpcProvider } from "wagmi/providers/jsonRpc" ;
910
1011const projectId = process . env . WALLET_CONNECT_PROJECT_ID ;
1112
12- const { publicClient } = configureChains ( supportedChains as any , [
13- w3mProvider ( { projectId } ) ,
14- ] ) ;
13+ const { publicClient } = configureChains (
14+ supportedChains as any ,
15+ [
16+ jsonRpcProvider ( {
17+ rpc : ( chain ) => ( {
18+ http : getChainRpc ( chain . id ) ,
19+ } ) ,
20+ } ) ,
21+ w3mProvider ( { projectId } ) ,
22+ ]
23+ ) ;
1524
1625const wagmiConfig = createConfig ( {
1726 autoConnect : true ,
You can’t perform that action at this time.
0 commit comments