Skip to content

Commit 547228f

Browse files
committed
feature: remove experimental chain filtering
1 parent 9aa51c0 commit 547228f

File tree

3 files changed

+4
-34
lines changed

3 files changed

+4
-34
lines changed

src/components/navbar/ChainSelector.tsx

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
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';
51
import { useChainSwitch } from '@/hooks/useChainSwitch.ts';
62
import useUserStore from '@/stores/useUser.store.ts';
73
import { getSupportedChains } from '@/utils/chain.utils.ts';
@@ -16,19 +12,8 @@ import {
1612
export 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()}

src/config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ export const SUPPORTED_CHAINS = [
6161
},
6262
wagmiNetwork: arbitrumSepolia,
6363
tokenSymbol: 'RLC',
64-
isExperimental: true,
6564
},
6665
];
6766

src/utils/chain.utils.ts

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,7 @@
1-
import { SUPPORTED_CHAINS, LOCAL_STORAGE_PREFIX } from '@/config';
2-
3-
function isExperimentalEnabled(): boolean {
4-
if (typeof window === 'undefined') return false;
5-
try {
6-
return (
7-
localStorage.getItem(`${LOCAL_STORAGE_PREFIX}_experimental`) === 'true'
8-
);
9-
} catch {
10-
return false;
11-
}
12-
}
1+
import { SUPPORTED_CHAINS } from '@/config';
132

143
export function getSupportedChains() {
15-
const experimental = isExperimentalEnabled();
16-
return SUPPORTED_CHAINS.filter(
17-
(chain) => !chain.isExperimental || experimental
18-
);
4+
return SUPPORTED_CHAINS;
195
}
206

217
export function getSubgraphUrl(chainId: number) {

0 commit comments

Comments
 (0)