aboutsummaryrefslogtreecommitdiffstats
path: root/src/app.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-08 09:24:17 -0700
committerAdam Soltys <[email protected]>2026-08-08 09:24:17 -0700
commita8636d2658aedab96eb545ef2f0ba0db972ca228 (patch)
treed35009786b643de94a22f1a259afc3cc9e595708 /src/app.js
parent19c14131ce3fc69a06d3c0af8d445b056d703bf9 (diff)
downloadcoinosv3-a8636d2658aedab96eb545ef2f0ba0db972ca228.tar.gz
coinosv3-a8636d2658aedab96eb545ef2f0ba0db972ca228.zip
The wizard waits out a signer login; a picked recipient shows its work, and search answers from memory before the network
Co-Authored-By: Claude Fable 5 <[email protected]>
Diffstat (limited to 'src/app.js')
-rw-r--r--src/app.js15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/app.js b/src/app.js
index 921717d..9c8731c 100644
--- a/src/app.js
+++ b/src/app.js
@@ -2179,8 +2179,12 @@ function onboardScreen() {
// Steps that were waiting on something advance the moment it exists — unless
// the user explicitly stepped back from username (heldFor remembers which
// wallet they backed away from); only a different wallet re-advances then.
+ // A nostr login in flight holds the step: the wallet opens mid-login, but
+ // whether the wizard should end (a restored account) isn't known until the
+ // login finishes — advancing now flashes "Choose your username" at people
+ // who chose one long ago.
if ((o.step === 'welcome' || o.step === 'signin') && ui.screen === 'wallet' && activeAccount()
- && activeAccount().id !== o.heldFor) {
+ && activeAccount().id !== o.heldFor && !ui.nostrLoginBusy) {
o.step = 'username';
o.enterAddr = featureHook('namesAddress') || null;
}
@@ -2990,7 +2994,7 @@ function parkSendField() {
const el = document.activeElement;
if (el && el.isConnected && el.tagName === 'INPUT') el.scrollIntoView({ block: 'start', behavior: 'smooth' });
}
-const sendSearcher = makeSearcher((q, rows) => { sendSearch.rows = rows; render(); if (rows.length) setTimeout(parkSendField, 50); });
+const sendSearcher = makeSearcher((q, rows) => { sendSearch.rows = rows; render(); if (rows && rows.length) setTimeout(parkSendField, 50); });
// One recipient: address + amount. Max is only offered for a single recipient.
function recipientRow(s, r, i) {
@@ -3034,11 +3038,12 @@ function recipientRow(s, r, i) {
});
const pickRecipient = (cand) => {
const v = cand.address || npubOf(cand.pk);
- sendSearcher.clear();
- addrInput.value = v;
+ // State first: clear() re-renders, and that render must already see the
+ // picked address — the old order repainted the half-typed query and left
+ // the pick looking like it did nothing.
r.address = v;
ui.sendError = '';
- syncCheck();
+ sendSearcher.clear();
if (!featureMatchSend(v)) render();
};
const row = h(