From c331d189bbe6e1d3e0a9b9916d772686bb716ad3 Mon Sep 17 00:00:00 2001 From: MananTank Date: Fri, 29 Aug 2025 18:13:06 +0000 Subject: [PATCH] Dashboard: Remove OP Sponsored badge in Chain selector (#7948) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ## PR-Codex overview This PR removes the handling of sponsored chains from the `CustomChainRenderer` component, including the related constant and UI elements that indicate whether a chain is sponsored. ### Detailed summary - Deleted the import of `OPSponsoredChains` from `@/constants/chains`. - Removed the `isSponsored` variable that checks if a chain is sponsored. - Eliminated the UI block that displayed "Sponsored" for sponsored chains. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` ## Summary by CodeRabbit - Refactor - Removed the Sponsored badge from the chain list, simplifying the chain renderer. - Deprecated chains still display a Deprecated badge and remain non-interactive. - Clicking non-deprecated chains continues to switch networks; the Configure Network button is unchanged. - Chores - Removed obsolete sponsor-related configuration and references. --- .../@/components/misc/CustomChainRenderer.tsx | 12 ---------- apps/dashboard/src/@/constants/chains.ts | 23 ------------------- 2 files changed, 35 deletions(-) delete mode 100644 apps/dashboard/src/@/constants/chains.ts diff --git a/apps/dashboard/src/@/components/misc/CustomChainRenderer.tsx b/apps/dashboard/src/@/components/misc/CustomChainRenderer.tsx index fb764c29922..ca63f7bfb66 100644 --- a/apps/dashboard/src/@/components/misc/CustomChainRenderer.tsx +++ b/apps/dashboard/src/@/components/misc/CustomChainRenderer.tsx @@ -3,7 +3,6 @@ import type { ThirdwebClient } from "thirdweb"; import type { UseNetworkSwitcherModalOptions } from "thirdweb/react"; import { Button } from "@/components/ui/button"; import { Spinner } from "@/components/ui/Spinner"; -import { OPSponsoredChains } from "@/constants/chains"; import { useAllChainsData } from "@/hooks/chains/allChains"; import { ChainIconClient } from "@/icons/ChainIcon"; import { cn } from "@/lib/utils"; @@ -32,7 +31,6 @@ export const CustomChainRenderer = ({ const { idToChain } = useAllChainsData(); const storedChain = idToChain.get(chain.id); const isDeprecated = storedChain?.status === "deprecated"; - const isSponsored = OPSponsoredChains.includes(chain.id); return (
@@ -70,16 +68,6 @@ export const CustomChainRenderer = ({ Deprecated
)} - {isSponsored && ( -
- Sponsored -
- )} {switching && (
diff --git a/apps/dashboard/src/@/constants/chains.ts b/apps/dashboard/src/@/constants/chains.ts deleted file mode 100644 index b18bb4c03fe..00000000000 --- a/apps/dashboard/src/@/constants/chains.ts +++ /dev/null @@ -1,23 +0,0 @@ -// TODO: move to API -export const OPSponsoredChains = [ - // Optimism - 10, - // Base - 8453, - // Zora - 7777777, - // Mode - 34443, - // Frax - 252, - // Cyber - 7560, - // Redstone - 690, - // Ancient8 - 888888888, - //Donatuz - 42026, - //Mantle - 5000, -];