// wagmi.ts
import { http, createConfig } from 'wagmi'
import { base, mainnet } from 'wagmi/chains'
import { injected, walletConnect } from 'wagmi/connectors'
export const config = createConfig({
chains: [base, mainnet],
connectors: [
injected(),
walletConnect({ projectId: process.env.NEXT_PUBLIC_WC_PROJECT_ID! }),
],
transports: {
[base.id]: http(),
[mainnet.id]: http(),
},
})
Your wagmi config should include at least one of these chains. The useYoClient hook will return null if the user is connected to an unsupported chain.