@@ -19,25 +19,22 @@ import { useCATStorage } from "@/hooks/useCATStorage";
1919import { SupportedChainId , CatDetails as StoredCatDetails } from "@/utils/indexedDB" ;
2020import toast from "react-hot-toast" ;
2121
22- // Define supported chain IDs - use the imported type from IndexedDB
23- // type SupportedChainId = 137 | 534351 | 5115 | 61 | 8453;
24-
2522// Chain ID to name mapping
2623const CHAIN_NAMES : Record < SupportedChainId , string > = {
27- // 137: "Polygon",
28- // 534351: "Scroll Sepolia",
24+ 137 : "Polygon" ,
25+ 534351 : "Scroll Sepolia" ,
2926 5115 : "Citrea Testnet" ,
30- // 61: "Ethereum Classic",
31- // 8453: "Base Mainnet",
27+ 61 : "Ethereum Classic" ,
28+ 8453 : "Base Mainnet" ,
3229} ;
3330
3431// Chain colors for visual distinction
3532const CHAIN_COLORS : Record < SupportedChainId , string > = {
36- // 137: "bg-purple-500",
37- // 534351: "bg-orange-500",
33+ 137 : "bg-purple-500" ,
34+ 534351 : "bg-orange-500" ,
3835 5115 : "bg-yellow-500" ,
39- // 61: "bg-green-500",
40- // 8453: "bg-blue-500",
36+ 61 : "bg-green-500" ,
37+ 8453 : "bg-blue-500" ,
4138} ;
4239
4340interface CatDetails {
@@ -60,8 +57,7 @@ interface PaginationInfo {
6057const isValidChainId = (
6158 chainId : number | string
6259) : chainId is SupportedChainId => {
63- // const validChainIds: SupportedChainId[] = [137, 534351, 5115, 61, 8453];
64- const validChainIds : SupportedChainId [ ] = [ 5115 ] ;
60+ const validChainIds : SupportedChainId [ ] = [ 137 , 534351 , 5115 , 61 , 8453 ] ;
6561 return validChainIds . includes ( Number ( chainId ) as SupportedChainId ) ;
6662} ;
6763
@@ -191,7 +187,7 @@ export default function MyCATsPage() {
191187 for ( const [ chainId , factoryAddress ] of Object . entries ( ClowderVaultFactories ) ) {
192188 if ( ! isValidChainId ( chainId ) ) continue ;
193189
194- const publicClient = getPublicClient ( config , { chainId : Number ( chainId ) as SupportedChainId } ) ;
190+ const publicClient = getPublicClient ( config , { chainId : Number ( chainId ) as any } ) ;
195191 if ( ! publicClient ) continue ;
196192
197193 try {
@@ -600,7 +596,7 @@ export default function MyCATsPage() {
600596 chainId : SupportedChainId ,
601597 defaultRole : 'admin' | 'minter' | 'both'
602598 ) : Promise < CatDetails [ ] > => {
603- const publicClient = getPublicClient ( config , { chainId } ) ;
599+ const publicClient = getPublicClient ( config , { chainId : chainId as any } ) ;
604600 if ( ! publicClient || ! addresses . length ) return [ ] ;
605601
606602 try {
0 commit comments