adding mockchain to the rainbow kit network selector

This commit is contained in:
2025-10-13 16:25:22 -04:00
parent 2303f92bf6
commit a698be783d
3 changed files with 28 additions and 10 deletions

View File

@@ -6,14 +6,32 @@ import { mainnet, polygon, optimism, arbitrum, base } from 'wagmi/chains';
import { QueryClientProvider, QueryClient } from '@tanstack/react-query';
import { ThemeProvider, useTheme } from 'next-themes';
import { useEffect, useState } from 'react';
import { defineChain } from 'viem';
import { TranslationsProvider } from '@/providers/translations-provider';
import { Header } from '@/components/header';
const mockchain = defineChain({
id: 31337,
name: 'Mockchain',
nativeCurrency: {
decimals: 18,
name: 'Ether',
symbol: 'ETH',
},
rpcUrls: {
default: { http: ['http://localhost:8545'] },
},
blockExplorers: {
default: { name: 'Explorer', url: 'http://localhost:8545' },
},
testnet: true,
});
const config = getDefaultConfig({
appName: 'Liquidity Party',
projectId: 'YOUR_PROJECT_ID', // Get this from https://cloud.walletconnect.com
chains: [mainnet, polygon, optimism, arbitrum, base],
chains: [mainnet, polygon, optimism, arbitrum, base, mockchain],
ssr: false,
});