mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-10 15:36:53 +02:00
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
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user