diff --git a/src/signer/nip46_client.rs b/src/signer/nip46_client.rs index 7cbd046..e9b84f9 100644 --- a/src/signer/nip46_client.rs +++ b/src/signer/nip46_client.rs @@ -40,7 +40,7 @@ const REQUEST_TIMEOUT: Duration = Duration::from_secs(30); const HANDSHAKE_TIMEOUT: Duration = Duration::from_secs(120); /// How long a pairing QR (client-initiated `nostrconnect://`) stays live /// while a human opens their signer and scans it. -const PAIRING_TIMEOUT: Duration = Duration::from_secs(120); +const PAIRING_TIMEOUT: Duration = Duration::from_secs(300); /// App name advertised to signers during client-initiated pairing. const APP_NAME: &str = "Keynectr"; @@ -581,6 +581,11 @@ impl Nip46ClientSigner { } }; let event = *incoming; + eprintln!( + "[nip46 pairing] inbound 24133 from {} (content len {})", + &event.pubkey.to_hex()[..16], + event.content.len() + ); // Never answer ourselves. if event.pubkey == our_pk { continue; @@ -588,9 +593,11 @@ impl Nip46ClientSigner { // Not addressed to us unless it decrypts with a conversation // keyed to this author. let Ok(conv) = ConversationKey::derive(keys.secret_key(), &event.pubkey) else { + eprintln!("[nip46 pairing] could not derive a conversation with this author"); continue; }; let Ok(plain) = nip44_decrypt(&conv, &event.content) else { + eprintln!("[nip46 pairing] payload did not decrypt (wrong conversation key)"); continue; }; let Ok(request) = serde_json::from_str::(&plain) else {