From 1a7ab8c793bfd006e421e599605e3664bb6dc25a Mon Sep 17 00:00:00 2001 From: Lixzon Date: Tue, 28 Jul 2026 10:14:01 +0100 Subject: [PATCH] feat: add unsupported chain detection with switch banner --- app/layout.tsx | 2 + .../wallet/unsupported-chain-banner.tsx | 114 ++++++++++++++++++ lib/wallet/chains.ts | 71 +++++++++++ lib/wallet/useUnsupportedChain.ts | 91 ++++++++++++++ test/tsconfig.json | 3 + test/unsupported-chain.test.ts | 38 ++++++ tsconfig.tsbuildinfo | 2 +- 7 files changed, 320 insertions(+), 1 deletion(-) create mode 100644 components/wallet/unsupported-chain-banner.tsx create mode 100644 lib/wallet/chains.ts create mode 100644 lib/wallet/useUnsupportedChain.ts create mode 100644 test/unsupported-chain.test.ts diff --git a/app/layout.tsx b/app/layout.tsx index 68952ea..8acaf70 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -2,6 +2,7 @@ import type { Metadata } from 'next' import './globals.css' import { RootProviders } from '@/lib/wallet/providers' import { Nav } from '@/components/nav' +import { UnsupportedChainBanner } from '@/components/wallet/unsupported-chain-banner' export const metadata: Metadata = { title: 'GuildPass', @@ -14,6 +15,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })