From 27de57652e0ff16937286bf25d9c6a991d695077 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 12 Jan 2026 10:13:29 +0000 Subject: [PATCH] fix: improve NIP-46 login experience - Remove redundant signer.open() call after fromBunkerURI (it already connects) - Increase QR code margin from 2 to 4 for better scanning - Increase QR code width to 280px --- src/components/nostr/LoginDialog.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/nostr/LoginDialog.tsx b/src/components/nostr/LoginDialog.tsx index ac9845c..8cf6f48 100644 --- a/src/components/nostr/LoginDialog.tsx +++ b/src/components/nostr/LoginDialog.tsx @@ -131,10 +131,11 @@ export default function LoginDialog({ open, onOpenChange }: LoginDialogProps) { // Set up pool methods for the signer NostrConnectSigner.pool = pool; + // fromBunkerURI parses the URI, creates the signer, and connects automatically const signer = await NostrConnectSigner.fromBunkerURI(bunkerUrl); signerRef.current = signer; - await signer.open(); + // Get the user's pubkey (signer is already connected) const pubkey = await signer.getPublicKey(); const account = new NostrConnectAccount(pubkey, signer); @@ -181,10 +182,10 @@ export default function LoginDialog({ open, onOpenChange }: LoginDialogProps) { }); setConnectUri(uri); - // Generate QR code + // Generate QR code with extra margin for better scanning const dataUrl = await QRCode.toDataURL(uri, { - width: 256, - margin: 2, + width: 280, + margin: 4, color: { dark: "#000000", light: "#ffffff",