1- import { LOCAL_STORAGE_PREFIX } from '@/config.ts' ;
2- import { useSearch } from '@tanstack/react-router' ;
3- import { useEffect } from 'react' ;
4- import useLocalStorageState from 'use-local-storage-state' ;
51import { useChainSwitch } from '@/hooks/useChainSwitch.ts' ;
62import useUserStore from '@/stores/useUser.store.ts' ;
73import { getSupportedChains } from '@/utils/chain.utils.ts' ;
@@ -16,19 +12,8 @@ import {
1612export function ChainSelector ( { className } : { className ?: string } ) {
1713 const { chainId } = useUserStore ( ) ;
1814 const { requestChainChange } = useChainSwitch ( ) ;
19- const search = useSearch ( { strict : false } ) ;
20- const [ , setExperimental ] = useLocalStorageState < boolean > (
21- `${ LOCAL_STORAGE_PREFIX } _experimental` ,
22- { defaultValue : false }
23- ) ;
24-
25- useEffect ( ( ) => {
26- if ( search ?. feature === 'experimental' ) {
27- setExperimental ( true ) ;
28- }
29- } , [ search ?. feature , setExperimental ] ) ;
3015
31- const filteredChains = getSupportedChains ( ) ;
16+ const chains = getSupportedChains ( ) ;
3217
3318 const handleChainChange = async ( value : string ) => {
3419 requestChainChange ( Number ( value ) ) ;
@@ -44,7 +29,7 @@ export function ChainSelector({ className }: { className?: string }) {
4429 < SelectValue placeholder = "Select Chain" />
4530 </ SelectTrigger >
4631 < SelectContent className = { className } >
47- { filteredChains . map ( ( chain ) => (
32+ { chains . map ( ( chain ) => (
4833 < SelectItem
4934 key = { chain . id }
5035 value = { chain . id . toString ( ) }
0 commit comments