aboutsummaryrefslogtreecommitdiffstats
path: root/src/features
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-03 21:49:07 -0700
committerAdam Soltys <[email protected]>2026-09-03 21:49:07 -0700
commit86fb1018bd11c2ba7e333007748fb076c046bce3 (patch)
tree1c8097cd81f8ee9e945e351872f25ea9dc483242 /src/features
parent6bfe57611b792ff3162de2e9e1a4e97240af8133 (diff)
downloadcoinosv3-86fb1018bd11c2ba7e333007748fb076c046bce3.tar.gz
coinosv3-86fb1018bd11c2ba7e333007748fb076c046bce3.zip
The real 'false start': the auto-select-Spending one-shot yanking the card back. On open, when Savings is empty and Ark has a balance, the wallet flips you to Spending — a convenience. But it fires on every Ark update and only latches once the balance SYNCS, which after a refresh arrives a second late — right after you've dragged to Savings, so it overrides your choice and slides back. Now any deliberate pick (carousel scroll/tap/flick, swipe, accounts screen) sets accountUserChosen, and the auto-select consumes its one-shot without flipping when you've already chosen
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MrkLsNScXe9b6BviUSdmMr
Diffstat (limited to 'src/features')
-rw-r--r--src/features/ark.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/features/ark.js b/src/features/ark.js
index a421dfb..30ecd51 100644
--- a/src/features/ark.js
+++ b/src/features/ark.js
@@ -496,6 +496,13 @@ export function arkFeature(ctx) {
let _autoSelected = false;
function maybeAutoSelectSpending() {
if (_autoSelected || wallet.watchOnly) return;
+ // The user beat us to it: they've already scrolled/tapped/flicked to an
+ // account this session. The "open onto Spending when Savings is empty"
+ // convenience only applies to the UNTOUCHED open — arriving late (when
+ // the ark balance finally syncs, a second after a refresh) and yanking
+ // the card away from the one they just chose is the exact opposite of
+ // convenient. Consume the one-shot so it can't fire behind them.
+ if (ui.accountUserChosen) { _autoSelected = true; return; }
const b = arkBalance();
if (!b || b.spendableSat + b.pendingSat <= 0) return;
_autoSelected = true;
@@ -2767,7 +2774,7 @@ export function arkFeature(ctx) {
return {
id: 'ark',
- init() { _autoSelected = false; initArk(); },
+ init() { _autoSelected = false; ui.accountUserChosen = false; initArk(); },
stop() { stopArk(); },
screenView() { return ui.arkCoinsPage ? arkCoinsPage() : ui.arkExitPage ? arkExitPage() : null; },
receiveTakeover() {