diff --git a/apps/portal/src/components/Document/AAChainList.tsx b/apps/portal/src/components/Document/AAChainList.tsx deleted file mode 100644 index 357928def46..00000000000 --- a/apps/portal/src/components/Document/AAChainList.tsx +++ /dev/null @@ -1,59 +0,0 @@ -/* eslint-disable @next/next/no-img-element */ -import { cn } from "@/lib/utils"; -import type { ChainMetadata } from "thirdweb/chains"; - -type ApiResponseType = { - data: Record; -}; - -async function getChains(): Promise { - try { - const [chainsWithServices, allChains] = await Promise.all([ - fetch("https://api.thirdweb.com/v1/chains/services", { - headers: { - "Content-Type": "application/json", - }, - }).then((res) => res.json() as Promise), - fetch("https://api.thirdweb.com/v1/chains", { - headers: { - "Content-Type": "application/json", - }, - }).then((res) => res.json() as Promise<{ data: ChainMetadata[] }>), - ]); - - const aaChains = Object.entries(chainsWithServices.data) - .filter(([, services]) => - services.some( - (service) => - service.service === "account-abstraction" && service.enabled, - ), - ) - .map(([chainId]) => Number(chainId)); - - const intersectedChains = allChains.data - .filter((chain) => - aaChains.some((aaChainId) => aaChainId === chain.chainId), - ) - .filter((c) => c.name) - .sort((a, b) => a.name.localeCompare(b.name)); - return intersectedChains; - } catch (error) { - console.error("Failed to fetch chains", error); - throw error; - } -} - -export async function AAChainList() { - const chains = await getChains(); - return ( -
-
    - {chains?.map((chain) => ( -
  • - {chain.name} ({chain.chainId}) -
  • - ))} -
-
- ); -} diff --git a/apps/portal/src/components/Document/index.ts b/apps/portal/src/components/Document/index.ts index 29e1d6eaead..2ac190059a0 100644 --- a/apps/portal/src/components/Document/index.ts +++ b/apps/portal/src/components/Document/index.ts @@ -24,7 +24,6 @@ export { ExpandableGrid } from "./ExpandableGrid"; export { Stack } from "./Stack"; export { createMetadata } from "./metadata"; export { ConnectCard } from "./Cards/ConnectCard"; -export { AAChainList } from "./AAChainList"; export { AuthList } from "./AuthList"; export { FeatureCard } from "./FeatureCard"; export { ApiEndpoint } from "./APIEndpointMeta/ApiEndpoint";