Custom connectors
Add custom connectors for Ethers or Wagmi
- Wagmi
- Ethers
If you already have Wagmi integrated into your application or would like more control over Wagmi's configuration, you can integrate Web3Modal on top of it.
import { createWeb3Modal } from '@web3modal/wagmi/react'
import { http, createConfig, WagmiProvider } from 'wagmi'
import { sepolia } from 'wagmi/chains'
import { walletConnect } from 'wagmi/connectors'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
const queryClient = new QueryClient()
const projectId = 'YOUR_PROJECT_ID'
const metadata = {
//...
}
const config = createConfig({
chains: [sepolia],
transports: {
[sepolia.id]: http()
},
connectors: [
walletConnect({ projectId, metadata, showQrModal: false }), // showQrModal must be false
// Other connectors...
]
})
createWeb3Modal({
wagmiConfig: config,
projectId,
})
export function ContextProvider({ children }) {
return (
<WagmiProvider config={config}>
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
</WagmiProvider>
)
}
Coming soon...
Was this helpful?