From c8e6de17311e3eaa18a73c2aa0688c80e89db254 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 1 Aug 2026 22:46:19 -0700 Subject: Get an address immediately, without waiting on a signer prompt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The passive setup path asked the browser extension to sign the claim, so it sat behind a permission popup — 20s per attempt, retried, hence the minute-long spinner ending in the manual form. The wallet's own key now makes that claim: no signer, no prompt, no wait. Tying the address to the user's real npub happens at login instead, where the signer is already live, and nominates the wallet key to manage the record after. Failures are visible now rather than hidden: the pane shows why setup failed, the watchdog is 12s instead of 60s, internal timeouts are tighter, and the registrar logs every refusal with its reason. Co-Authored-By: Claude Fable 5 --- src/features/nostrlogin.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/features/nostrlogin.js') diff --git a/src/features/nostrlogin.js b/src/features/nostrlogin.js index cea13b4..7d4bdc1 100644 --- a/src/features/nostrlogin.js +++ b/src/features/nostrlogin.js @@ -52,6 +52,8 @@ export function nostrLoginFeature(ctx) { live = signer; await ctx.openMnemonic(res.mnemonic, res.passphrase || '', { nostrPubkey: signer.pubkey }); save({ ...load(), pubkey: signer.pubkey, linked: Date.now() }); + // claim the real npub as the payment address while this signer is live + ctx.hook('namesAdoptIdentity', signer, npubOf(signer.pubkey))?.catch?.(() => {}); toast(res.mode === 'derived' ? t('nlOpenedDerived') : t('nlOpenedRestored')); busy(false); } catch (e) { fail(e); } @@ -68,6 +70,7 @@ export function nostrLoginFeature(ctx) { live = st.signer; await ctx.openMnemonic(mnemonic, '', { nostrPubkey: st.signer.pubkey }); save({ ...load(), pubkey: st.signer.pubkey, linked: Date.now() }); + ctx.hook('namesAdoptIdentity', st.signer, npubOf(st.signer.pubkey))?.catch?.(() => {}); toast(t('nlCreated')); busy(false); } catch (e) { fail(e); } @@ -89,6 +92,7 @@ export function nostrLoginFeature(ctx) { await publishWalletBackup(signer, { mnemonic: wallet.mnemonic, passphrase: wallet.passphrase || '' }); live = signer; save({ ...load(), pubkey: signer.pubkey, linked: Date.now() }); + ctx.hook('namesAdoptIdentity', signer, npubOf(signer.pubkey))?.catch?.(() => {}); toast(t('nlLinked')); busy(false); } catch (e) { fail(e); } -- cgit v1.2.3