{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"token-stack","type":"registry:ui","title":"Token Stack","description":"Displays overlapping token logos for baskets, pools, routes, and portfolio rows.","docs":"```tsx\nimport { TokenStack } from \"@/components/ui/token-stack\"\n\n<TokenStack tokens={[{ symbol: \"ETH\", name: \"Ethereum\" }, { symbol: \"USDC\", name: \"USD Coin\" }]} />\n```","dependencies":["viem@2.55.19"],"devDependencies":[],"registryDependencies":["tooltip"],"files":[{"path":"registry/onchain-ui/token-stack.tsx","type":"registry:ui","target":"components/ui/token-stack.tsx","content":"\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport {\n  Tooltip,\n  TooltipContent,\n  TooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { TokenLogo, type TokenLogoProps } from \"./token-logo\";\nimport type { ReactNode } from \"react\";\n\nexport interface TokenStackItem\n  extends Pick<\n    TokenLogoProps,\n    | \"address\"\n    | \"chainId\"\n    | \"fallback\"\n    | \"isNative\"\n    | \"name\"\n    | \"src\"\n    | \"symbol\"\n  > {\n  id?: string | undefined;\n}\n\nexport interface TokenStackProps {\n  /** Tokens to display in the stack */\n  tokens: TokenStackItem[];\n  /** Maximum visible tokens before overflow. Default: 5 */\n  limit?: number | undefined;\n  /** Token logo size: a named size or pixels, e.g. 28. Default: md */\n  size?: TokenLogoProps[\"size\"] | undefined;\n  /** Which logo is drawn on top where two overlap. Default: left (the first) */\n  direction?: \"left\" | \"right\" | undefined;\n  /** Pixels each logo overlaps the one before it. Default: 8 */\n  overlap?: number | undefined;\n  /** Ring each logo in the background colour to separate the overlap. Default: true */\n  ring?: boolean | undefined;\n  /** Passed to each TokenLogo. Default: tile */\n  variant?: TokenLogoProps[\"variant\"];\n  /** Show overflow count when tokens exceed limit. Default: true */\n  showOverflow?: boolean | undefined;\n  /** Custom overflow renderer */\n  renderOverflow?: ((count: number) => ReactNode) | undefined;\n  /** Custom token renderer for icon libraries or chain overlays */\n  renderToken?: ((token: TokenStackItem, index: number) => ReactNode) | undefined;\n  /** Show animated tooltips for tokens. Default: false */\n  showTooltip?: boolean | undefined;\n  /** Token tooltip content. Defaults to name, symbol, then address. */\n  getTooltipContent?: ((token: TokenStackItem, index: number) => ReactNode) | undefined;\n  /** Overflow tooltip content. Defaults to hidden token symbols/names. */\n  getOverflowTooltipContent?: ((tokens: TokenStackItem[]) => ReactNode) | undefined;\n  /** Accessible label for the group */\n  \"aria-label\"?: string | undefined;\n  /** Applied to the root wrapper */\n  className?: string | undefined;\n  /** Applied to each token wrapper */\n  itemClassName?: string | undefined;\n  /** Applied to the overflow item */\n  overflowClassName?: string | undefined;\n}\n\n// A pixel margin rather than -space-x-2: a fixed 8px swallowed most of a\n// 12px logo and barely touched a 40px one.\nconst DEFAULT_OVERLAP = 8;\n\nconst overflowSizeClasses = {\n  xs: \"size-5 text-[9px]\",\n  sm: \"size-6 text-[10px]\",\n  md: \"size-8 text-xs\",\n  lg: \"size-10 text-sm\",\n  xl: \"size-12 text-base\",\n} as const;\n\n// Mirrors TokenLogo so a pixel-sized overflow badge matches the logos.\nfunction getPixelFontSize(size: number) {\n  return Math.max(8, Math.round(size * 0.375));\n}\n\nfunction getTokenKey(token: TokenStackItem, index: number) {\n  // Index-suffixed so the same token can legitimately appear twice, e.g. in\n  // swap routes.\n  return `${token.id ?? token.address ?? token.symbol ?? token.name ?? \"token\"}:${index}`;\n}\n\nexport function TokenStack({\n  tokens,\n  limit = 5,\n  size = \"md\",\n  direction = \"left\",\n  overlap = DEFAULT_OVERLAP,\n  ring = true,\n  variant,\n  showOverflow = true,\n  renderOverflow,\n  renderToken,\n  showTooltip = false,\n  getTooltipContent,\n  getOverflowTooltipContent,\n  \"aria-label\": ariaLabel = \"Token stack\",\n  className,\n  itemClassName,\n  overflowClassName,\n}: TokenStackProps) {\n  const visibleTokens = tokens.slice(0, limit);\n  const hiddenTokens = tokens.slice(limit);\n  const overflowCount = Math.max(tokens.length - visibleTokens.length, 0);\n\n  const getDefaultTooltipContent = (token: TokenStackItem) =>\n    token.name ?? token.symbol ?? token.address;\n\n  const getDefaultOverflowTooltipContent = () => (\n    <div className=\"flex flex-col gap-1\">\n      {hiddenTokens.map((token, index) => (\n        <span key={getTokenKey(token, index)}>\n          {token.symbol ?? token.name ?? token.address}\n        </span>\n      ))}\n    </div>\n  );\n\n  return (\n    <div\n      className={cn(\"flex items-center\", className)}\n      aria-label={ariaLabel}\n      role=\"list\"\n    >\n      {visibleTokens.map((token, index) => {\n        const item = (\n          <span\n            key={getTokenKey(token, index)}\n            className={cn(\n              \"relative inline-flex rounded-full\",\n              ring && \"ring-2 ring-background/70\",\n              \"hover:z-10\",\n              itemClassName\n            )}\n            title={!showTooltip ? token.name ?? token.symbol ?? undefined : undefined}\n            role=\"listitem\"\n            style={{\n              marginLeft: index === 0 ? undefined : -overlap,\n              zIndex:\n                direction === \"left\" ? visibleTokens.length - index : index + 1,\n            }}\n          >\n            {renderToken ? (\n              renderToken(token, index)\n            ) : (\n              <TokenLogo\n                address={token.address}\n                chainId={token.chainId}\n                fallback={token.fallback}\n                isNative={token.isNative}\n                name={token.name}\n                size={size}\n                src={token.src}\n                symbol={token.symbol}\n                variant={variant}\n              />\n            )}\n          </span>\n        );\n\n        if (!showTooltip) return item;\n\n        return (\n          <Tooltip key={getTokenKey(token, index)}>\n            <TooltipTrigger render={item} />\n            <TooltipContent>\n              {getTooltipContent\n                ? getTooltipContent(token, index)\n                : getDefaultTooltipContent(token)}\n            </TooltipContent>\n          </Tooltip>\n        );\n      })}\n\n      {showOverflow && overflowCount > 0 && (() => {\n        const overflowItem = (\n          <span\n            className={cn(\n              \"relative inline-flex shrink-0 items-center justify-center rounded-full border bg-muted font-medium text-muted-foreground\",\n              ring && \"ring-2 ring-background/70\",\n              typeof size === \"number\" ? null : overflowSizeClasses[size],\n              overflowClassName\n            )}\n            style={{\n              width: typeof size === \"number\" ? size : undefined,\n              height: typeof size === \"number\" ? size : undefined,\n              fontSize: typeof size === \"number\" ? getPixelFontSize(size) : undefined,\n              marginLeft: visibleTokens.length === 0 ? undefined : -overlap,\n            }}\n            aria-label={`${overflowCount} more tokens`}\n            role=\"listitem\"\n          >\n            {renderOverflow ? renderOverflow(overflowCount) : `+${overflowCount}`}\n          </span>\n        );\n\n        if (!showTooltip) return overflowItem;\n\n        return (\n          <Tooltip>\n            <TooltipTrigger render={overflowItem} />\n            <TooltipContent>\n              {getOverflowTooltipContent\n                ? getOverflowTooltipContent(hiddenTokens)\n                : getDefaultOverflowTooltipContent()}\n            </TooltipContent>\n          </Tooltip>\n        );\n      })()}\n    </div>\n  );\n}\n"},{"path":"registry/onchain-ui/token-logo.tsx","type":"registry:ui","target":"components/ui/token-logo.tsx","content":"\"use client\";\n\nimport { useMemo, useState, type ReactNode } from \"react\";\nimport { cn } from \"@/lib/utils\";\nimport { getTokenIcon } from \"@/lib/onchain/crypto-icons\";\nimport {\n  Tooltip,\n  TooltipContent,\n  TooltipTrigger,\n} from \"@/components/ui/tooltip\";\n\nconst sizeClasses = {\n  xs: \"size-5 text-[9px]\",\n  sm: \"size-6 text-[10px]\",\n  md: \"size-8 text-xs\",\n  lg: \"size-10 text-sm\",\n  xl: \"size-12 text-base\",\n} as const;\n\n// Pixel sizes for layouts that size marks in px rather than steps. The font\n// tracks the named sizes (~3/8 of the diameter) with a floor for legibility.\n// Kept as numbers for a literal style object: shadcn/lint's no-inline-styles\n// cannot check a computed one.\nfunction getPixelFontSize(size: number) {\n  return Math.max(8, Math.round(size * 0.375));\n}\n\nexport interface TokenLogoProps {\n  /** Token image URL. Always wins over inferred icons */\n  src?: string | null | undefined;\n  /** Token symbol, used for alt text and fallback initials */\n  symbol?: string | null | undefined;\n  /** Token name, used for alt text */\n  name?: string | null | undefined;\n  /** Token contract address, used for icon inference and as a fallback label */\n  address?: string | null | undefined;\n  /** EVM chain id, used with address to infer an icon via the crypto-icons adapter */\n  chainId?: number | null | undefined;\n  /** Use the native-currency icon rather than the wrapped token at `address` */\n  isNative?: boolean | undefined;\n  /** Named size, or a diameter in pixels such as 28. Default: md */\n  size?: keyof typeof sizeClasses | number | undefined;\n  /** Custom fallback content when the image is missing or fails */\n  fallback?: ReactNode | undefined;\n  /** Show an animated tooltip. Default: false */\n  showTooltip?: boolean | undefined;\n  /** Tooltip content. Defaults to name, symbol, then address. */\n  tooltipContent?: ReactNode | undefined;\n  /**\n   * `tile` draws the image on a bordered muted circle. `bare` draws it on\n   * nothing, for logos that bring their own padding on a transparent canvas,\n   * where a tile reads as a ring around every mark. Default: tile\n   */\n  variant?: \"tile\" | \"bare\" | undefined;\n  /** Load the image eagerly at high priority, for logos above the fold */\n  priority?: boolean | undefined;\n  /** Applied to the root wrapper */\n  className?: string | undefined;\n  /** Applied to the image */\n  imageClassName?: string | undefined;\n  /** Applied to the fallback */\n  fallbackClassName?: string | undefined;\n}\n\nfunction getFallbackText({\n  address,\n  name,\n  symbol,\n}: Pick<TokenLogoProps, \"address\" | \"name\" | \"symbol\">) {\n  if (symbol) return symbol.slice(0, 4).toUpperCase();\n  if (name) return name.slice(0, 2).toUpperCase();\n  if (address) return address.slice(2, 4).toUpperCase();\n  return \"?\";\n}\n\nexport function TokenLogo({\n  src,\n  symbol,\n  name,\n  address,\n  chainId,\n  isNative = false,\n  size = \"md\",\n  fallback,\n  showTooltip = false,\n  tooltipContent,\n  variant = \"tile\",\n  priority = false,\n  className,\n  imageClassName,\n  fallbackClassName,\n}: TokenLogoProps) {\n  const [failedSrc, setFailedSrc] = useState<string | null>(null);\n\n  // Explicit src wins; otherwise ask the crypto-icons adapter.\n  const inferredIcon = useMemo(\n    () =>\n      src ? null : getTokenIcon({ chainId, address, isNative, symbol }),\n    [address, chainId, isNative, src, symbol]\n  );\n  const resolvedSrc =\n    src ?? (typeof inferredIcon === \"string\" ? inferredIcon : null);\n  const inferredNode =\n    inferredIcon != null && typeof inferredIcon !== \"string\"\n      ? inferredIcon\n      : null;\n  const shouldShowImage = Boolean(resolvedSrc) && failedSrc !== resolvedSrc;\n\n  const alt = useMemo(() => {\n    if (name && symbol) return `${name} (${symbol})`;\n    return name ?? symbol ?? address ?? \"Token\";\n  }, [address, name, symbol]);\n\n  const tooltip = tooltipContent ?? name ?? symbol ?? address;\n\n  // The fallback keeps its tile in every variant, so a missing logo is still\n  // a visible shape.\n  const bare = variant === \"bare\" && (shouldShowImage || inferredNode != null);\n  const px = typeof size === \"number\" ? size : undefined;\n\n  const logo = (\n    <span\n      className={cn(\n        \"relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full font-medium text-muted-foreground\",\n        bare ? null : \"border bg-muted\",\n        px === undefined ? sizeClasses[size as keyof typeof sizeClasses] : null,\n        className\n      )}\n      style={{\n        width: px,\n        height: px,\n        fontSize: px === undefined ? undefined : getPixelFontSize(px),\n      }}\n    >\n      {shouldShowImage ? (\n        <img\n          src={resolvedSrc ?? undefined}\n          alt={alt}\n          className={cn(\n            \"size-full\",\n            variant === \"bare\" ? \"object-contain\" : \"object-cover\",\n            imageClassName\n          )}\n          loading={priority ? \"eager\" : \"lazy\"}\n          fetchPriority={priority ? \"high\" : undefined}\n          decoding=\"async\"\n          referrerPolicy=\"no-referrer\"\n          onError={() => setFailedSrc(resolvedSrc)}\n        />\n      ) : inferredNode ? (\n        inferredNode\n      ) : (\n        <span className={cn(\"select-none\", fallbackClassName)}>\n          {fallback ?? getFallbackText({ address, name, symbol })}\n        </span>\n      )}\n    </span>\n  );\n\n  if (!showTooltip || tooltip == null) return logo;\n\n  return (\n    <Tooltip>\n      <TooltipTrigger render={logo} />\n      <TooltipContent>{tooltip}</TooltipContent>\n    </Tooltip>\n  );\n}\n"},{"path":"lib/onchain/crypto-icons.tsx","type":"registry:lib","target":"lib/onchain/crypto-icons.tsx","content":"import { getAddress } from \"viem\";\nimport type { ReactNode } from \"react\";\n\n/**\n * Crypto icon adapter.\n *\n * This file is the single seam onchain-ui components use to resolve token and\n * network icons — the crypto equivalent of shadcn's icon library setting.\n * Swap the implementations to point at your icon package, token list, CDN, or\n * indexer; the component contract stays the same.\n *\n * Both functions may return:\n * - a string, treated as an image URL\n * - a ReactNode, rendered directly in place of the image\n * - null, meaning \"unknown\" — components fall back to readable initials\n *\n * Explicit props (`src`, `fallback`) always win over this adapter.\n */\n\nexport type CryptoIcon = string | ReactNode | null;\n\nexport interface TokenIconQuery {\n  /** EVM chain id the token lives on */\n  chainId?: number | null | undefined;\n  /** Token contract address */\n  address?: string | null | undefined;\n  /** Token symbol. Unused by the default adapter: symbols are not canonical */\n  symbol?: string | null | undefined;\n  /** Whether this is the chain's native currency rather than an ERC-20 */\n  isNative?: boolean | undefined;\n}\n\n// Chain folder names in the Trust Wallet assets repo.\nconst trustWalletChainFolders: Record<number, string> = {\n  1: \"ethereum\",\n  10: \"optimism\",\n  137: \"polygon\",\n  8453: \"base\",\n  42161: \"arbitrum\",\n};\n\n/**\n * Resolves a token icon from the community-maintained Trust Wallet assets\n * repo by chain id and contract address. Coverage is good for established\n * tokens; misses degrade to the component's initials fallback.\n *\n * This default is fine for demos and prototypes. In production, prefer your\n * own token metadata (`src`) or point this function at your token list or\n * CDN.\n */\nexport function getTokenIcon(query: TokenIconQuery): CryptoIcon {\n  const { chainId, address, isNative, symbol } = query;\n  if (isNative && symbol?.toUpperCase() === \"ETH\") {\n    return <EthereumMark className=\"size-full\" />;\n  }\n  if (chainId == null || !address) return null;\n\n  const chainFolder = trustWalletChainFolders[chainId];\n  if (!chainFolder) return null;\n\n  try {\n    // The repo stores assets under EIP-55 checksummed addresses.\n    const checksummed = getAddress(address);\n    return `https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/${chainFolder}/assets/${checksummed}/logo.png`;\n  } catch {\n    return null;\n  }\n}\n\nfunction EthereumMark({ className }: { className?: string }) {\n  return (\n    <svg viewBox=\"0 0 32 32\" aria-hidden=\"true\" className={className}>\n      <circle cx=\"16\" cy=\"16\" r=\"16\" fill=\"#627EEA\" />\n      <g fill=\"#FFF\">\n        <path fillOpacity=\".602\" d=\"M16.498 4v8.87l7.497 3.35z\" />\n        <path d=\"M16.498 4L9 16.22l7.498-3.35z\" />\n        <path fillOpacity=\".602\" d=\"M16.498 21.968v6.027L24 17.616z\" />\n        <path d=\"M16.498 27.995v-6.028L9 17.616z\" />\n        <path fillOpacity=\".2\" d=\"M16.498 20.573l7.497-4.353-7.497-3.348z\" />\n        <path fillOpacity=\".602\" d=\"M9 16.22l7.498 4.353v-7.701z\" />\n      </g>\n    </svg>\n  );\n}\n\nfunction BaseMark({ className }: { className?: string }) {\n  return (\n    <svg viewBox=\"0 0 146 146\" aria-hidden=\"true\" className={className}>\n      <circle cx=\"73\" cy=\"73\" r=\"73\" fill=\"#0052FF\" />\n      <path\n        d=\"M73.323 123.729C101.617 123.729 124.553 100.832 124.553 72.5875C124.553 44.343 101.617 21.4463 73.323 21.4463C46.4795 21.4463 24.4581 42.0558 22.271 68.2887H89.9859V76.8864H22.271C24.4581 103.119 46.4795 123.729 73.323 123.729Z\"\n        fill=\"white\"\n      />\n    </svg>\n  );\n}\n\nfunction OptimismMark({ className }: { className?: string }) {\n  return (\n    <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" className={className}>\n      <circle cx=\"12\" cy=\"12\" r=\"12\" fill=\"#FF0420\" />\n      <path\n        fillRule=\"evenodd\"\n        clipRule=\"evenodd\"\n        d=\"M4.85865 15.3781C5.43829 15.7927 6.18265 16 7.09173 16C8.19009 16 9.06774 15.7517 9.72466 15.2553C10.3809 14.7516 10.8427 13.9926 11.1099 12.978C11.2703 12.3558 11.4079 11.7149 11.5226 11.0554C11.5598 10.8196 11.5788 10.6231 11.5795 10.4659C11.5795 9.94787 11.4459 9.50377 11.1786 9.13373C10.9039 8.74954 10.5214 8.4555 10.0793 8.28884C9.61364 8.09628 9.08706 8 8.49956 8C6.34017 8 5.00078 9.01845 4.48139 11.0554C4.29802 11.804 4.15686 12.4448 4.05796 12.978C4.02335 13.176 4.00397 13.3764 4 13.5773C4 14.3554 4.28622 14.9557 4.85865 15.3781ZM8.99176 12.9112C8.77268 13.762 8.16848 14.3161 7.25186 14.3161C6.34508 14.3161 6.03561 13.703 6.19869 12.9112C6.33623 12.1927 6.47377 11.5852 6.61132 11.0888C6.8471 10.1702 7.40316 9.68389 8.35023 9.68389C9.25407 9.68389 9.5488 10.2891 9.3926 11.0888C9.3009 11.6075 9.16729 12.215 8.99176 12.9112ZM12.4608 15.9204C12.5059 15.9728 12.5691 15.999 12.6504 15.999H14.1653C14.2427 15.9981 14.3174 15.9703 14.3765 15.9204C14.4423 15.8699 14.4862 15.796 14.4993 15.7141L14.9778 13.4742H16.5182C17.4909 13.4742 18.2513 13.0026 18.8083 12.583C19.3729 12.1638 19.7477 11.5162 19.9332 10.6398C19.9784 10.4342 20.0006 10.236 20 10.0454C20 9.38327 19.7477 8.87666 19.2435 8.5256C18.7457 8.1752 18.0849 8 17.2609 8H14.2989C14.2209 8.00126 14.1458 8.02976 14.0867 8.08056C14.0222 8.13166 13.9788 8.20477 13.9649 8.28589L12.4274 15.7141C12.411 15.7846 12.423 15.8587 12.4608 15.9204ZM17.874 10.6172C17.7345 11.2293 17.201 11.7893 16.5742 11.7893H15.2941L15.7352 9.68389H17.0713C17.5262 9.68389 17.9064 9.77428 17.9064 10.2743C17.9064 10.3726 17.8963 10.4868 17.874 10.6172Z\"\n        fill=\"white\"\n      />\n    </svg>\n  );\n}\n\nfunction ArbitrumMark({ className }: { className?: string }) {\n  return (\n    <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" className={className}>\n      <circle cx=\"12\" cy=\"12\" r=\"12\" fill=\"#213147\" />\n      <path\n        d=\"M13.203 13.2158L12.4164 15.3402C12.3951 15.3993 12.3951 15.4636 12.4164 15.5227L13.7695 19.178L15.3346 18.2879L13.4562 13.2158C13.4136 13.099 13.2456 13.099 13.203 13.2158Z\"\n        fill=\"white\"\n      />\n      <path\n        d=\"M14.78 9.64306C14.7373 9.52621 14.5693 9.52621 14.5267 9.64306L13.7402 11.7674C13.7188 11.8265 13.7188 11.8909 13.7402 11.9499L15.9571 17.9345L17.5221 17.0443L14.78 9.64306Z\"\n        fill=\"white\"\n      />\n      <path\n        d=\"M11.9985 4.9913C12.0371 4.9913 12.0758 5.0018 12.1104 5.02019L18.0787 8.41424C18.148 8.45363 18.1907 8.52716 18.1907 8.60462V15.3914C18.1907 15.4702 18.148 15.5424 18.0787 15.5818L12.1104 18.9759C12.0772 18.9955 12.0371 19.0047 11.9985 19.0047C11.9598 19.0047 11.9211 18.9943 11.8865 18.9759L5.91826 15.5844C5.84894 15.545 5.80628 15.4715 5.80628 15.3941V8.60593C5.80628 8.52716 5.84894 8.45494 5.91826 8.41555L11.8865 5.0215C11.9211 5.0018 11.9598 4.9913 11.9985 4.9913ZM11.9985 4C11.7865 4 11.5732 4.05383 11.3826 4.16281L5.41568 7.55555C5.03442 7.77219 4.7998 8.17265 4.7998 8.60593V15.3927C4.7998 15.826 5.03442 16.2265 5.41568 16.4431L11.3839 19.8371C11.5745 19.9448 11.7865 20 11.9998 20C12.2118 20 12.425 19.9462 12.6157 19.8371L18.5839 16.4431C18.9652 16.2265 19.1998 15.826 19.1998 15.3927V8.60593C19.1998 8.17265 18.9652 7.77219 18.5839 7.55555L12.6143 4.16281C12.4237 4.05383 12.2104 4 11.9985 4Z\"\n        fill=\"white\"\n      />\n      <path d=\"M8.05225 17.9426L8.60149 16.4615L9.70662 17.3662L8.67348 18.2958L8.05225 17.9426Z\" fill=\"white\" />\n      <path\n        d=\"M11.4965 8.12012H9.98351C9.87019 8.12012 9.76888 8.1897 9.73022 8.29474L6.48682 17.0523L8.05186 17.9425L11.6232 8.29868C11.6565 8.21203 11.5912 8.12012 11.4965 8.12012Z\"\n        fill=\"white\"\n      />\n      <path\n        d=\"M14.144 8.12012H12.6309C12.5176 8.12012 12.4163 8.1897 12.3776 8.29474L8.67432 18.2944L10.2393 19.1846L14.2706 8.29868C14.3026 8.21203 14.2373 8.12012 14.144 8.12012Z\"\n        fill=\"white\"\n      />\n    </svg>\n  );\n}\n\nfunction PolygonMark({ className }: { className?: string }) {\n  return (\n    <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" className={className}>\n      <defs>\n        <linearGradient\n          id=\"onchain-ui-polygon-bg\"\n          x1=\"3.948\"\n          y1=\"16.617\"\n          x2=\"19.217\"\n          y2=\"7.645\"\n          gradientUnits=\"userSpaceOnUse\"\n        >\n          <stop stopColor=\"#A726C1\" />\n          <stop offset=\"0.88\" stopColor=\"#803BDF\" />\n          <stop offset=\"1\" stopColor=\"#7B3FE4\" />\n        </linearGradient>\n      </defs>\n      <circle cx=\"12\" cy=\"12\" r=\"12\" fill=\"url(#onchain-ui-polygon-bg)\" />\n      <path\n        d=\"M15.8794 14.8595L19.6745 12.6947C19.8757 12.5797 20 12.3664 20 12.1375V7.80782C20 7.57894 19.8757 7.36569 19.6745 7.25069L15.8794 5.08583C15.6782 4.97083 15.4284 4.97195 15.2284 5.08583L11.4332 7.25069C11.232 7.36569 11.1077 7.57894 11.1077 7.80782V15.545L8.44614 17.0623L5.78456 15.545V12.5093L8.44614 10.992L10.2013 11.9935V9.95705L8.77163 9.1409C8.67331 9.08508 8.56029 9.05493 8.44614 9.05493C8.33199 9.05493 8.21897 9.08508 8.12065 9.1409L4.32549 11.3058C4.12432 11.4208 4 11.634 4 11.8629V16.1926C4 16.4215 4.12432 16.6347 4.32549 16.7497L8.12065 18.9146C8.32182 19.0285 8.57046 19.0285 8.77163 18.9146L12.5668 16.7497C12.768 16.6347 12.8923 16.4215 12.8923 16.1926V8.45538L12.9397 8.42859L15.5527 6.93808L18.2143 8.45538V11.4911L15.5527 13.0084L13.7998 12.0092V14.0456L15.2272 14.8595C15.4284 14.9734 15.6782 14.9734 15.8782 14.8595H15.8794Z\"\n        fill=\"white\"\n      />\n    </svg>\n  );\n}\n\n/**\n * Resolves a network icon by chain id. The default adapter ships crisp inline\n * marks for common chains so `<NetworkLogo chainId={8453} />` works offline\n * with zero configuration.\n */\nexport function getNetworkIcon(chainId?: number | null): CryptoIcon {\n  if (chainId === 1) return <EthereumMark className=\"size-full\" />;\n  if (chainId === 10) return <OptimismMark className=\"size-full\" />;\n  if (chainId === 137) return <PolygonMark className=\"size-full\" />;\n  if (chainId === 8453) return <BaseMark className=\"size-full\" />;\n  if (chainId === 42161) return <ArbitrumMark className=\"size-full\" />;\n  return null;\n}\n"}]}