diff --git a/apps/dashboard/src/@/icons/ConnectSDKIcon.tsx b/apps/dashboard/src/@/icons/ConnectSDKIcon.tsx deleted file mode 100644 index fa1e9a2e7f8..00000000000 --- a/apps/dashboard/src/@/icons/ConnectSDKIcon.tsx +++ /dev/null @@ -1,21 +0,0 @@ -export function ConnectSDKIcon(props: { className?: string }) { - return ( - - - - ); -} diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/SupportedProductsSection.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/SupportedProductsSection.tsx index ec7ec06c3af..957e8c64255 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/SupportedProductsSection.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/SupportedProductsSection.tsx @@ -1,55 +1,112 @@ +import { BotIcon, CodeIcon, CoinsIcon } from "lucide-react"; import Link from "next/link"; -import type { ChainMetadataWithServices } from "@/types/chain"; -import { products } from "../../../../components/server/products"; +import { useMemo } from "react"; +import { BridgeIcon } from "@/icons/BridgeIcon"; +import { PayIcon } from "@/icons/PayIcon"; +import { WalletProductIcon } from "@/icons/WalletProductIcon"; +import type { + ChainMetadataWithServices, + ChainSupportedService, +} from "@/types/chain"; import { SectionTitle } from "./SectionTitle"; export function SupportedProductsSection(props: { services: ChainMetadataWithServices["services"]; }) { - const enabledProducts = products.filter((product) => { - return props.services.find( - (service) => service.service === product.id && service.enabled, + const enabledServices = useMemo(() => { + return props.services.reduce( + (acc, service) => { + acc[service.service] = service.enabled; + return acc; + }, + {} as Record, ); - }); - - if (enabledProducts.length === 0) { - return null; - } + }, [props.services]); return (
- {enabledProducts.map((product) => { - return ( -
-
-
- -
-
-
-

- - {product.name} - -

-

- {product.description} -

-
-
- ); - })} + {enabledServices["connect-sdk"] && ( + + )} + + {enabledServices["account-abstraction"] && ( + + )} + + {enabledServices.pay && ( + + )} + + {enabledServices.contracts && ( + + )} + + + +
); } + +function ProductCard(props: { + icon: React.FC<{ className?: string }>; + link: string; + name: string; + description: string; +}) { + return ( +
+
+
+ +
+
+
+

+ + {props.name} + +

+

{props.description}

+
+
+ ); +} diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/client/filters.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/client/filters.tsx index cb69e35cdd2..5a3f34c480a 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/client/filters.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/client/filters.tsx @@ -15,7 +15,7 @@ import { import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"; import { Separator } from "@/components/ui/separator"; import { useDashboardRouter } from "@/lib/DashboardRouter"; -import { products } from "../../../components/server/products"; +import { services } from "../../../components/server/products"; function cleanUrl(url: string) { if (url.endsWith("?")) { @@ -345,7 +345,7 @@ export const ChainServiceFilter: React.FC = ({ const section = ( - {products.map((product) => ( + {services.map((product) => (
= ({ } const firstFilter = allFilters[0]; - const name = products.find((p) => p.id === firstFilter)?.name; + const name = services.find((p) => p.id === firstFilter)?.name; const plus = allFilters.length > 1 ? ` +${allFilters.length - 1}` : ""; return [`${name}${plus}`, true]; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/server/chainlist-row.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/server/chainlist-row.tsx index fefb8e26749..01dc2d26000 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/server/chainlist-row.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/server/chainlist-row.tsx @@ -12,7 +12,7 @@ import { ToolTipLabel } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; import type { ChainSupportedService } from "@/types/chain"; import { ChainIcon } from "../../../components/server/chain-icon"; -import { products } from "../../../components/server/products"; +import { services } from "../../../components/server/products"; import { getCustomChainMetadata } from "../../../utils"; type ChainListRowProps = { @@ -83,7 +83,7 @@ export function ChainListRow({
- {products.map((p) => { + {services.map((p) => { return ( ; - description: string; link: string; }>; diff --git a/packages/service-utils/src/core/services.ts b/packages/service-utils/src/core/services.ts index ffaead9ae84..bdcb373370d 100644 --- a/packages/service-utils/src/core/services.ts +++ b/packages/service-utils/src/core/services.ts @@ -4,7 +4,7 @@ export const SERVICE_DEFINITIONS = { actions: [], description: "Bundler & Paymaster services", name: "bundler", - title: "Account Abstraction", + title: "Gas Sponsorship", }, chainsaw: { // all actions allowed @@ -18,7 +18,7 @@ export const SERVICE_DEFINITIONS = { actions: [], description: "E-mail and social login wallets for easy web3 onboarding", name: "embeddedWallets", - title: "Wallets", + title: "User Wallets", }, engineCloud: { @@ -27,14 +27,14 @@ export const SERVICE_DEFINITIONS = { description: "Transaction API and Server wallets with high transaction throughput and low latency", name: "engineCloud", - title: "Transactions", + title: "Server Wallets", }, insight: { // all actions allowed actions: [], description: "Indexed data for any EVM chain", name: "insight", - title: "Insight", + title: "Indexer", }, nebula: { // all actions allowed @@ -42,7 +42,7 @@ export const SERVICE_DEFINITIONS = { description: "Advanced blockchain reasoning and execution capabilities with AI", name: "nebula", - title: "thirdweb AI", + title: "AI", }, pay: { // all actions allowed @@ -50,7 +50,7 @@ export const SERVICE_DEFINITIONS = { description: "Bridge, swap, and purchase cryptocurrencies and execute transactions with any fiat or tokens via cross-chain routing", name: "pay", - title: "Payments", + title: "Bridge", }, relayer: { // all actions allowed