aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-27 23:37:52 -0700
committerAdam Soltys <[email protected]>2026-08-27 23:37:52 -0700
commit92dd80a816c3efdabfd9aaabb3461d9078b39b5e (patch)
treed3cccb14220ed7c22b2e2c16cd03554f763013b3 /src
parent05df998c0e72d4579620ee9e7fd990c99905ab14 (diff)
downloadcoinosv3-92dd80a816c3efdabfd9aaabb3461d9078b39b5e.tar.gz
coinosv3-92dd80a816c3efdabfd9aaabb3461d9078b39b5e.zip
The wallet arrives without ceremony: sign-in swaps screens instantly (a one-shot no-anim flag on the handover), and the spending-setup ask holds its tongue until the name restore has settled instead of flashing while the answer is seconds away
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019eA8JRq9Wr7z2fRQk99HLi
Diffstat (limited to 'src')
-rw-r--r--src/app.js9
-rw-r--r--src/features/names.js3
-rw-r--r--src/features/nostrlogin.js2
3 files changed, 13 insertions, 1 deletions
diff --git a/src/app.js b/src/app.js
index e6c9018..9435cc3 100644
--- a/src/app.js
+++ b/src/app.js
@@ -478,7 +478,13 @@ function renderInner() {
// navigations: boot screens shuffle beneath the shell (unlock → restored
// wallet), then the resolved profile replaces the shell in place. The key
// still updates, but nothing slides or re-animates until the landing ends.
- if (uiChanged('nav', navKey) && !(ui.pubProfPending || ui.pubProfHold)) _navAt = performance.now();
+ if (uiChanged('nav', navKey)) {
+ // ui.navAnimSkip: a one-shot "this navigation must not animate" — set by
+ // sign-in right before the wallet screen takes over, so the handover is
+ // an instant swap instead of a fade over a page that's still settling.
+ if (!(ui.pubProfPending || ui.pubProfHold || ui.navAnimSkip)) _navAt = performance.now();
+ ui.navAnimSkip = false;
+ }
applyAnim(screen, 'anim-page', (performance.now() - _navAt) < 340 ? performance.now() - _navAt : -1);
morphChildren(root, [screen, footer()]);
if (fpath) {
@@ -3229,6 +3235,7 @@ function balanceCard() {
? h('button', { class: 'btn-sm', style: 'margin-top:10px', onClick: () => { ui.arkMoveDir = 'toSpending'; ui.arkMoveOpen = true; render(); } }, t('topUpFromSavings'))
: null,
!hasSpending && !kindLocked && featureHook('arkReady') && !wallet.watchOnly && acc0 && acc0.type === 'full'
+ && featureHook('namesSettled') !== 'pending' // a restoring name may prove Spending any second — don't flash the setup ask
? h('button', { class: 'btn-sm', style: 'margin-top:10px', onClick: () => {
acc0.spendingSetup = Date.now();
persistAccounts();
diff --git a/src/features/names.js b/src/features/names.js
index 7096955..235b834 100644
--- a/src/features/names.js
+++ b/src/features/names.js
@@ -650,6 +650,9 @@ export function namesFeature(ctx) {
namesAdoptIdentity(signer, npub) { return adoptIdentity(signer, npub); },
// the claimed payment address, for anyone prefilling a lightning address
namesAddress() { const st = load(); return st.name ? `${st.name}@${st.domain || DOMAIN()}` : null; },
+ // 'pending' while the restore/claim pass is still running — the wallet
+ // screen holds spending-setup prompts until the name question is settled.
+ namesSettled() { return checked ? 'yes' : 'pending'; },
// the onboarding wizard renders the same claim form on its username step
namesClaimForm() { return claimForm(true); },
// claim a specific name (the migration flow, after coinos.io released it)
diff --git a/src/features/nostrlogin.js b/src/features/nostrlogin.js
index de4269b..dbf2ece 100644
--- a/src/features/nostrlogin.js
+++ b/src/features/nostrlogin.js
@@ -108,6 +108,7 @@ export function nostrLoginFeature(ctx) {
// 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');
+ ui.navAnimSkip = true; // the handover swaps instantly, no fade
await ctx.openMnemonic(res.mnemonic, res.passphrase || '', { nostrPubkey: signer.pubkey });
save({ ...load(), pubkey: signer.pubkey, linked: Date.now(), ...sessionOf(signer) });
attaching = false;
@@ -131,6 +132,7 @@ export function nostrLoginFeature(ctx) {
attaching = true;
live = selfHealing(st.signer);
ctx.onbNostrLogin(!!existing); // before the screen flips — see loginWith
+ ui.navAnimSkip = true; // the handover swaps instantly, no fade
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;