diff --git a/src/components/header/selector/ChainSelector.tsx b/src/components/header/selector/ChainSelector.tsx index 89d180d45..dfaf1292d 100644 --- a/src/components/header/selector/ChainSelector.tsx +++ b/src/components/header/selector/ChainSelector.tsx @@ -89,7 +89,7 @@ export const ChainSelector = ({ leftAlign }: ChainSelectorProps) => { (config) => { return ( // eslint-disable-next-line @typescript-eslint/no-explicit-any - !TESTNET_CHAIN_IDS.includes(config.chainId as any) + TESTNET_CHAIN_IDS.includes(config.chainId as any) ); } ) diff --git a/src/lib/constants/chains.ts b/src/lib/constants/chains.ts index 28136596f..25415cc6e 100644 --- a/src/lib/constants/chains.ts +++ b/src/lib/constants/chains.ts @@ -108,9 +108,9 @@ export const SUPPORTED_GAS_ESTIMATE_CHAIN_IDS = [ export const TESTNET_CHAIN_IDS = [ ChainId.GOERLI, - // ChainId.SEPOLIA, + ChainId.SEPOLIA, ChainId.POLYGON_MUMBAI, - 80002, + ChainId_POLYGON_AMOY, LocalChainId // ChainId.ARBITRUM_GOERLI, // ChainId.OPTIMISM_GOERLI, @@ -127,7 +127,7 @@ export const L1_CHAIN_IDS = [ // ChainId.SEPOLIA, ChainId.POLYGON, ChainId.POLYGON_MUMBAI, - 80002, + ChainId_POLYGON_AMOY, LocalChainId // ChainId.CELO, // ChainId.CELO_ALFAJORES @@ -165,7 +165,7 @@ export function getChainPriority(chainId: number): number { return 0; case ChainId.POLYGON: case ChainId.POLYGON_MUMBAI: - case 80002: + case ChainId_POLYGON_AMOY: return 1; // case ChainId.ARBITRUM_ONE: // case ChainId.ARBITRUM_GOERLI: diff --git a/src/lib/utils/hooks/useSyncChainQuery.ts b/src/lib/utils/hooks/useSyncChainQuery.ts index b3bcf10a9..0163fc48b 100644 --- a/src/lib/utils/hooks/useSyncChainQuery.ts +++ b/src/lib/utils/hooks/useSyncChainQuery.ts @@ -69,17 +69,14 @@ export default function useSyncChainQuery() { // connecting if (!isSupportedChain(chainId)) { - { - // connecting account to an unsupported chain ${chainId} - const configIdToConnect = (urlConfigId || - currentConfigId) as ConfigId; - selectChain(configIdToConnect); + // connecting account to an unsupported chain ${chainId} + const configIdToConnect = (urlConfigId || currentConfigId) as ConfigId; + selectChain(configIdToConnect); - if (configIdToConnect) { - searchParams.set(configQueryParameters.configId, configIdToConnect); - setSearchParams(searchParams); - configIdRef.current = configIdToConnect; - } + if (configIdToConnect) { + searchParams.set(configQueryParameters.configId, configIdToConnect); + setSearchParams(searchParams); + configIdRef.current = configIdToConnect; } } }