From 935661bae50ce7c044add01bfe97adb8168d73b0 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 28 Jan 2026 10:09:59 +0000 Subject: [PATCH] feat: add relay and mint dropdowns to Cashu wallet header Replace text mint count with interactive dropdowns: - Radio icon with relay count shows list of wallet relays - Landmark icon with mint count shows list of mints - Header layout: name status <-> refresh relays mints settings --- src/components/Nip61WalletViewer.tsx | 78 +++++++++++++++++++++++++--- 1 file changed, 71 insertions(+), 7 deletions(-) diff --git a/src/components/Nip61WalletViewer.tsx b/src/components/Nip61WalletViewer.tsx index 0b71257..cb2023e 100644 --- a/src/components/Nip61WalletViewer.tsx +++ b/src/components/Nip61WalletViewer.tsx @@ -22,6 +22,8 @@ import { ChevronDown, ArrowDownLeft, Search, + Landmark, + Radio, } from "lucide-react"; import { toast } from "sonner"; import { Button } from "@/components/ui/button"; @@ -30,6 +32,12 @@ import { TooltipContent, TooltipTrigger, } from "@/components/ui/tooltip"; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from "@/components/ui/dropdown-menu"; import { Dialog, DialogContent, @@ -209,6 +217,7 @@ export default function Nip61WalletViewer() { totalBalance, history, mints, + relays, unlock, unlocking, error, @@ -336,13 +345,6 @@ export default function Nip61WalletViewer() { 0 ? ( - - {mints.length} mint{mints.length !== 1 ? "s" : ""} - - ) : undefined - } actions={
@@ -361,6 +363,68 @@ export default function Nip61WalletViewer() { Refresh Wallet + {/* Relays dropdown */} + + + + + + + + Wallet Relays + + + {relays && relays.length > 0 ? ( + relays.map((relay) => ( + + {relay.replace("wss://", "")} + + )) + ) : ( + + No relays configured + + )} + + + + {/* Mints dropdown */} + + + + + + + + Wallet Mints + + + {mints && mints.length > 0 ? ( + mints.map((mint) => ( + + {new URL(mint).hostname} + + )) + ) : ( + + No mints configured + + )} + + +