aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-14 21:58:33 -0700
committerAdam Soltys <[email protected]>2026-09-14 21:58:33 -0700
commita493b12aca18a670296f0f7142ad041b87ec1b69 (patch)
tree14f96895e33bfd085d4158317232404d6ef51087 /src
parent6307cc6b4881b9707911ff667fa91c1ffe59757c (diff)
downloadcoinosv3-a493b12aca18a670296f0f7142ad041b87ec1b69.tar.gz
coinosv3-a493b12aca18a670296f0f7142ad041b87ec1b69.zip
A gift locked from Savings shows under Savings, not Spending.
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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/app.js23
-rw-r--r--src/features/ark.js2
-rw-r--r--src/features/gifts.js3
3 files changed, 16 insertions, 12 deletions
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
diff --git a/src/features/ark.js b/src/features/ark.js
index d64c635..e0c8f19 100644
--- a/src/features/ark.js
+++ b/src/features/ark.js
@@ -3424,7 +3424,7 @@ export function arkFeature(ctx) {
const a = ((arkStateNow() || {}).actions || []).find(
(x) => x.type === 'board' && x.fundingTxid && !['done', 'failed'].includes(x.step) && x.needConfs);
const prog = a ? ` · ${Math.min(a.confs || 0, a.needConfs)}/${a.needConfs}` : '';
- return [{ label: t('movingLabel') + prog, sat: b.boardingSat }];
+ return [{ label: t('movingLabel') + prog, sat: b.boardingSat, side: 'spending' }];
},
walletNotices() {
// Everything the balance needs to say, said once. These used to be a
diff --git a/src/features/gifts.js b/src/features/gifts.js
index 4f5225c..111303e 100644
--- a/src/features/gifts.js
+++ b/src/features/gifts.js
@@ -961,7 +961,8 @@ export function giftsFeature(ctx) {
},
balanceLines() {
const locked = wallet.giftLockedValue();
- return locked > 0 ? [{ label: t('lockedInGifts'), sat: locked }] : [];
+ // on-chain reservations: money still in Savings, spoken for
+ return locked > 0 ? [{ label: t('lockedInGifts'), sat: locked, side: 'savings' }] : [];
},
historyEntries(txs, sel) {
// These are ON-CHAIN gift reservations — Savings timeline. Ark gifts show