From a493b12aca18a670296f0f7142ad041b87ec1b69 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 14 Sep 2026 21:58:33 -0700 Subject: A gift locked from Savings shows under Savings, not Spending. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every feature balance line landed on the Spending face, but a gift's locked reservation is on-chain money still sitting in Savings. Lines now say which side they belong to and draw on that card: gifts on Savings beside pending incoming, ark's Moving… on Spending as before. Co-Authored-By: Claude Fable 5.1 --- src/app.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'src/app.js') diff --git a/src/app.js b/src/app.js index 8036a7e..6a2171e 100644 --- a/src/app.js +++ b/src/app.js @@ -3794,16 +3794,19 @@ function balanceCard() { h('div', { class: 'amt', style: firstLoad ? 'opacity:.3' : '' }, firstLoad ? h('span', { class: 'spinner sm', style: 'margin-right:8px' }) : null, animatedAmount('bal:' + view, viewSpending ? spending : saving), ' ', unitTag('unit')), - (pending > 0 && !viewSpending) || (viewSpending && featLines.length) - ? h('div', { class: 'split' }, - // Pending incoming is an on-chain fact — it belongs to the Saving - // face; the feature lines (ark's Moving…) belong to Spending. - pending > 0 && !viewSpending - ? h('div', {}, h('div', { class: 'k' }, t('pending')), h('div', { class: 'v pending' }, fmtAmount(pending), ' ', unitTag())) - : null, - ...(viewSpending ? featLines : []).map((l) => - h('div', {}, h('div', { class: 'k' }, l.label), h('div', { class: 'v' }, fmtAmount(l.sat), ' ', unitTag())))) - : null); + // Pending incoming is an on-chain fact — it belongs to the Saving face. + // A feature line says which side it belongs to (ark's Moving… is + // Spending; a gift's Locked reservation is on-chain, so Saving) — one + // face used to take them all, and a gift sent from Savings showed up + // as locked money under Spending. + (() => { + const lines = (viewSpending ? [] : pending > 0 ? [{ label: t('pending'), sat: pending, cls: 'v pending' }] : []) + .concat(featLines.filter((l) => (l.side || 'spending') === (viewSpending ? 'spending' : 'savings'))); + return lines.length + ? h('div', { class: 'split' }, + ...lines.map((l) => h('div', {}, h('div', { class: 'k' }, l.label), h('div', { class: l.cls || 'v' }, fmtAmount(l.sat), ' ', unitTag())))) + : null; + })()); }; // Everything below the balance figure — the move button, top-up offer, // spend-setup offer and the inline unfold panel. In carousel mode these -- cgit v1.2.3