import { useSeoMeta } from '@unhead/react'; import { Layout } from '@/components/Layout'; import { WalletModal } from '@/components/WalletModal'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; import { Button } from '@/components/ui/button'; import { Badge } from '@/components/ui/badge'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import { useWallet } from '@/hooks/useWallet'; import { useNWC } from '@/hooks/useNWCContext'; import { useCurrentUser } from '@/hooks/useCurrentUser'; import { useCashu } from '@/hooks/wallet/useCashu'; import { useSatsToUsd } from '@/hooks/useExchangeRate'; import { LoginArea } from '@/components/auth/LoginArea'; import { CashuWalletCard } from '@/components/wallet/CashuWalletCard'; import { LightningPrivacyTips } from '@/components/wallet/LightningPrivacyTips'; import { WalletComparisonGuide } from '@/components/wallet/WalletComparisonGuide'; import { Wallet, Zap, Settings, CheckCircle, XCircle, ExternalLink, Globe, WalletMinimal, Info, Nut, } from 'lucide-react'; function WalletStatusCard() { const { webln } = useWallet(); const { connections } = useNWC(); const { totalBalance: cashuBalance, isInitialized: hasCashu } = useCashu(); const cashuUsd = useSatsToUsd(cashuBalance); const hasNWC = connections.length > 0 && connections.some(c => c.isConnected); const isReady = webln || hasNWC || hasCashu; return (
Wallet Status {isReady ? 'Ready' : 'Not Connected'}
{isReady ? 'Your wallet is connected and ready to send zaps!' : 'Connect a wallet to enable Lightning zaps'}
{/* Cashu Wallet Status */}

Cashu Wallet

{hasCashu && cashuBalance > 0 ? `${cashuBalance.toLocaleString()} sats${cashuUsd ? ` (~$${cashuUsd.toFixed(2)})` : ''}` : 'Built-in ecash wallet'}

{hasCashu ? ( ) : ( )}
{/* WebLN Status */}

WebLN

Browser extension wallet

{webln ? ( ) : ( )}
{/* NWC Status */}

Nostr Wallet Connect

{connections.length > 0 ? `${connections.length} wallet${connections.length !== 1 ? 's' : ''} connected` : 'Remote wallet connection'}

{hasNWC ? ( ) : ( )}
); } function ZapsInfoCard() { return ( What are Zaps?

Zaps are Lightning Network micropayments on Nostr. They allow you to send satoshis (sats) instantly to other users as a way of tipping, thanking, or supporting their content.

⚡

Instant

Payments settle in seconds over the Lightning Network

🔐

Flexible custody

Use your own wallet (self-custodial) or a custodial service - your choice

🥜

NutZaps for privacy

Use Cashu ecash for private zaps - mints can't see who pays whom

💜

Value for value

Support creators directly for content you appreciate

); } function WalletResourcesCard() { const walletResources = [ { name: 'Alby', description: 'Browser extension wallet with WebLN + NWC support', url: 'https://getalby.com', type: 'WebLN', }, { name: 'Minibits', description: 'Mobile Cashu wallet with NWC support', url: 'https://www.minibits.cash', type: 'NWC', }, { name: 'Zeus', description: 'Self-custodial mobile Lightning wallet', url: 'https://zeusln.com', type: 'NWC', }, { name: 'Coinos', description: 'Web-based Lightning wallet, works on any device', url: 'https://coinos.io', type: 'NWC', }, ]; return ( Recommended Wallets Get started with one of these Lightning wallets
{walletResources.map((wallet) => (

{wallet.name}

{wallet.type}

{wallet.description}

))}
Want to learn more? Check out Plan B Academy's wallet guides
); } function NotLoggedInCard() { return (

Login Required

Log in with your Nostr account to connect your Lightning wallet and start zapping.

); } export default function WalletPage() { useSeoMeta({ title: 'Wallet - SkateSpots', description: 'Connect your Lightning wallet to send zaps to skaters and spot creators.', }); const { user } = useCurrentUser(); return (
{/* Header */}

Wallet

Manage your Bitcoin and send zaps to skaters and creators

{user ? (
{/* Wallet Comparison Guide */} Cashu Wallet Lightning {/* Privacy Tips at the top */}
) : (
)}
); }