diff options
| author | Adam Soltys <[email protected]> | 2026-08-27 23:27:46 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-08-27 23:27:46 -0700 |
| commit | 05df998c0e72d4579620ee9e7fd990c99905ab14 (patch) | |
| tree | adf9cf9d6be70d9e184aab78c9e0457a2f8457eb /src/features | |
| parent | 036c3b134daaeb1aa9780629ae3e84d3881dbc62 (diff) | |
| download | coinosv3-05df998c0e72d4579620ee9e7fd990c99905ab14.tar.gz coinosv3-05df998c0e72d4579620ee9e7fd990c99905ab14.zip | |
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
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019eA8JRq9Wr7z2fRQk99HLi
Diffstat (limited to 'src/features')
| -rw-r--r-- | src/features/nostrlogin.js | 7 |
1 files changed, 5 insertions, 2 deletions
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); } |
