From 05df998c0e72d4579620ee9e7fd990c99905ab14 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 27 Aug 2026 23:27:46 -0700 Subject: One fade, not two: the onboarding wizard hands over before the screen flips, so signing in no longer re-animates the welcome for a beat — the wallet rises in with its content already aboard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_019eA8JRq9Wr7z2fRQk99HLi --- src/features/nostrlogin.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/features/nostrlogin.js b/src/features/nostrlogin.js index 911358a..de4269b 100644 --- a/src/features/nostrlogin.js +++ b/src/features/nostrlogin.js @@ -104,12 +104,15 @@ export function nostrLoginFeature(ctx) { if (res.publish) await publishWalletBackup(signer, { mnemonic: res.mnemonic }).catch(() => {}); attaching = true; live = selfHealing(signer); + // hand the wizard over BEFORE the screen flips: walletScreen routes + // back into onboarding while ui.onb is set, so clearing it afterwards + // re-animated the welcome screen for a beat before the wallet appeared + ctx.onbNostrLogin(res.mode === 'restored'); await ctx.openMnemonic(res.mnemonic, res.passphrase || '', { nostrPubkey: signer.pubkey }); save({ ...load(), pubkey: signer.pubkey, linked: Date.now(), ...sessionOf(signer) }); attaching = false; // claim the real npub as the payment address while this signer is live ctx.hook('namesAdoptIdentity', signer, npubOf(signer.pubkey))?.catch?.(() => {}); - ctx.onbNostrLogin(res.mode === 'restored'); toast(res.mode === 'derived' ? t('nlOpenedDerived') : t('nlOpenedRestored')); busy(false); } catch (e) { fail(e); } @@ -127,11 +130,11 @@ export function nostrLoginFeature(ctx) { if (!existing) await publishWalletBackup(st.signer, { mnemonic }); attaching = true; live = selfHealing(st.signer); + ctx.onbNostrLogin(!!existing); // before the screen flips — see loginWith await ctx.openMnemonic(mnemonic, (existing && existing.passphrase) || '', { nostrPubkey: st.signer.pubkey }); save({ ...load(), pubkey: st.signer.pubkey, linked: Date.now(), ...sessionOf(st.signer) }); attaching = false; ctx.hook('namesAdoptIdentity', st.signer, npubOf(st.signer.pubkey))?.catch?.(() => {}); - ctx.onbNostrLogin(!!existing); toast(existing ? t('nlOpenedRestored') : t('nlCreated')); busy(false); } catch (e) { fail(e); } -- cgit v1.2.3