From 0a19b26e1289f79de7b9e3ddd149617c894e6250 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 18 Aug 2026 00:39:03 -0700 Subject: The top-up prompt counts money already on its way: a board awaiting confirmation quiets both the card button and the wizard step Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01JtaatFfAbx91Nh3xqKVqKz --- src/app.js | 6 ++++-- src/features/ark.js | 7 +++++++ 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/app.js b/src/app.js index b7892ea..7c33c18 100644 --- a/src/app.js +++ b/src/app.js @@ -2712,7 +2712,8 @@ function onboardScreen() { // one and Spending is empty-handed — a spending account with nothing in it // is a demo, not a wallet. const nextAfterAvatar = () => - (featureHook('arkReady') && wallet.spendable > 1000 && (featureHook('spendingSat') || 0) < 1000) + (featureHook('arkReady') && wallet.spendable > 1000 + && (featureHook('spendingSat') || 0) + (featureHook('spendingBoardingSat') || 0) < 1000) ? 'board' : 'success'; if (o.step === 'legacy') { @@ -3180,7 +3181,8 @@ function balanceCard() { // (Explicit latches carry a timestamp; self-heal only eats legacy booleans.) // A Spending face running on fumes while Savings sits comfortable gets a // one-tap top-up into the board panel. - hasSpending && isSpending && !ui.arkMoveOpen && spending < 1000 && wallet.spendable > 1000 + hasSpending && isSpending && !ui.arkMoveOpen && wallet.spendable > 1000 + && spending + (featureHook('spendingBoardingSat') || 0) < 1000 && featureHook('arkReady') && !wallet.watchOnly ? h('button', { class: 'btn-sm', style: 'margin-top:10px', onClick: () => { ui.arkMoveDir = 'toSpending'; ui.arkMoveOpen = true; render(); } }, t('topUpFromSavings')) : null, diff --git a/src/features/ark.js b/src/features/ark.js index 8ca63bd..5641186 100644 --- a/src/features/ark.js +++ b/src/features/ark.js @@ -2269,6 +2269,13 @@ export function arkFeature(ctx) { if (!ui.arkMoveOpen || wallet.watchOnly || !arkAvailable()) return null; return movePanel(); }, + // Sats mid-board (the on-chain tx awaiting its confirmation) — Spending + // doesn't count them yet, but a top-up PROMPT must: nagging someone to + // top up again while their top-up confirms is noise. + spendingBoardingSat() { + const b = arkBalance(); + return b ? b.boardingSat || 0 : 0; + }, spendingSat() { const b = arkBalance(); return b ? b.spendableSat + b.pendingSat : 0; -- cgit v1.2.3