diff --git a/src/components/WalletModal.tsx b/src/components/WalletModal.tsx index c5fd8b2..7643ea5 100644 --- a/src/components/WalletModal.tsx +++ b/src/components/WalletModal.tsx @@ -1,4 +1,4 @@ -import { useState } from 'react'; +import { useState, forwardRef } from 'react'; import { Wallet, Plus, Trash2, Zap, Globe, WalletMinimal, CheckCircle, X } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { @@ -28,12 +28,183 @@ import { useNWC } from '@/hooks/useNWCContext'; import { useWallet } from '@/hooks/useWallet'; import { useToast } from '@/hooks/useToast'; import { useIsMobile } from '@/hooks/useIsMobile'; +import type { NWCConnection, NWCInfo } from '@/hooks/useNWC'; interface WalletModalProps { children?: React.ReactNode; className?: string; } +// Extracted AddWalletContent to prevent re-renders +const AddWalletContent = forwardRef void; + connectionUri: string; + setConnectionUri: (value: string) => void; +}>(({ alias, setAlias, connectionUri, setConnectionUri }, ref) => ( +
+
+ + setAlias(e.target.value)} + /> +
+
+ +