diff --git a/template/web/src/store/createWagmiConfig.ts b/template/web/src/store/createWagmiConfig.ts index 221aa0b0..31d2c125 100644 --- a/template/web/src/store/createWagmiConfig.ts +++ b/template/web/src/store/createWagmiConfig.ts @@ -1,6 +1,7 @@ import { createConfig, http } from 'wagmi'; import { base, baseSepolia } from 'wagmi/chains'; -import { coinbaseWallet } from 'wagmi/connectors'; +import { injected, metaMask, safe, walletConnect, coinbaseWallet } from 'wagmi/connectors'; +import { WALLET_CONNECT_PROJECT_ID } from '@/utils/wagmi'; export function createWagmiConfig(rpcUrl: string, projectId?: string) { // Keep this till we fully deprecated RK inside the template @@ -19,6 +20,12 @@ export function createWagmiConfig(rpcUrl: string, projectId?: string) { appName: 'buildonchainapps', preference: 'smartWalletOnly', }), + injected(), + walletConnect({ + projectId: WALLET_CONNECT_PROJECT_ID + }), + // metaMask(), + safe(), ], ssr: true, transports: { diff --git a/template/web/src/utils/wagmi.ts b/template/web/src/utils/wagmi.ts new file mode 100644 index 00000000..6d935898 --- /dev/null +++ b/template/web/src/utils/wagmi.ts @@ -0,0 +1,3 @@ +import isClient from './isClient'; + +export const WALLET_CONNECT_PROJECT_ID = process.env.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID ?? '';