aboutsummaryrefslogtreecommitdiffstats
path: root/src/features
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-04 01:13:33 -0700
committerAdam Soltys <[email protected]>2026-08-04 01:13:33 -0700
commitddcba79565c797d06d1f1cc066f78197d0e8ce70 (patch)
tree6f11583b424eeb84cd30ef4db0f69e4fbc3bef53 /src/features
parent971db911d47af391695a9d83a3d31c089bfee782 (diff)
downloadcoinosv3-ddcba79565c797d06d1f1cc066f78197d0e8ce70.tar.gz
coinosv3-ddcba79565c797d06d1f1cc066f78197d0e8ce70.zip
A restored login ends the wizard instead of stalling in it
Signing in mid-wizard with a key whose wallet was restored left you on the sign-in step: the back-button hold matched the restored account and blocked the auto-advance. A login now clears the hold explicitly — and a restored wallet skips the rest of onboarding entirely; it was already onboarded wherever it came from. Co-Authored-By: Claude Fable 5 <[email protected]>
Diffstat (limited to 'src/features')
-rw-r--r--src/features/nostrlogin.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/features/nostrlogin.js b/src/features/nostrlogin.js
index 731c1b9..222b516 100644
--- a/src/features/nostrlogin.js
+++ b/src/features/nostrlogin.js
@@ -98,6 +98,7 @@ export function nostrLoginFeature(ctx) {
save({ ...load(), pubkey: signer.pubkey, linked: Date.now(), ...sessionOf(signer) });
// 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); }
@@ -119,6 +120,7 @@ export function nostrLoginFeature(ctx) {
await ctx.openMnemonic(mnemonic, (existing && existing.passphrase) || '', { nostrPubkey: st.signer.pubkey });
save({ ...load(), pubkey: st.signer.pubkey, linked: Date.now(), ...sessionOf(st.signer) });
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); }