diff --git a/src/components/wallet/CashuWallet.tsx b/src/components/wallet/CashuWallet.tsx index 826a2e7..fe11eb0 100644 --- a/src/components/wallet/CashuWallet.tsx +++ b/src/components/wallet/CashuWallet.tsx @@ -336,8 +336,20 @@ export function CashuWallet() { // Start/stop QR scanner when modal opens/closes useEffect(() => { if (showQRScanner) { + // Lock body scroll on mobile + document.body.style.overflow = 'hidden'; + document.body.style.position = 'fixed'; + document.body.style.width = '100%'; + document.body.style.height = '100%'; + startScanning(handleQRScanResult); } else { + // Restore body scroll + document.body.style.overflow = ''; + document.body.style.position = ''; + document.body.style.width = ''; + document.body.style.height = ''; + stopScanning(); } // eslint-disable-next-line react-hooks/exhaustive-deps diff --git a/src/components/wallet/WalletModals.tsx b/src/components/wallet/WalletModals.tsx index d406839..336d1c8 100644 --- a/src/components/wallet/WalletModals.tsx +++ b/src/components/wallet/WalletModals.tsx @@ -5,7 +5,6 @@ import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { X, Coins, AlertTriangle, RefreshCw, Key, ArrowRightLeft, Loader2 } from 'lucide-react'; import { QRModal } from '@/components/ui/qr-modal'; -import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog'; import { nip19 } from 'nostr-tools'; import { useToast } from '@/hooks/useToast'; import { UTXO } from '@/lib/bitcoin'; @@ -484,50 +483,84 @@ export function WalletModals({ )} - {/* QR Scanner Modal */} + {/* QR Scanner Modal - Full Screen Overlay */} {showQRScanner && ( - { - if (!open) { - setShowQRScanner(false); - stopScanning(); - } - }}> - + {/* Close button */} + + + {/* Camera view */} +
- - {/* Error message */} - {qrError && ( -
- {qrError} -
- )} -
-
+ height: '100%', + overflow: 'hidden' + }} + /> + + {/* Error message */} + {qrError && ( +
+ {qrError} +
+ )} + )} );