diff options
| author | Adam Soltys <[email protected]> | 2026-07-05 08:02:34 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-07-05 08:02:34 -0700 |
| commit | db7e70fac51e16c7f389e031a80355b2d9d0f57e (patch) | |
| tree | 4592ced52154d56edee0991de1e2044431ee95d2 /src/features/ark.js | |
| parent | b6875f7bcefe10c4c23868d7952c4584d557aa60 (diff) | |
| download | coinosv3-db7e70fac51e16c7f389e031a80355b2d9d0f57e.tar.gz coinosv3-db7e70fac51e16c7f389e031a80355b2d9d0f57e.zip | |
Boarding UX: label the funding tx and show an in-flight ark balance
The board's on-chain send showed as a generic 'Sent' and the sats
vanished from the balance until the vtxo registered. The funding tx now
reads 'Ark board' in History (with a detail section showing the net
credit), and an 'Ark (boarding…)' line carries the pending amount from
broadcast until the board completes.
Co-Authored-By: Claude Fable 5 <[email protected]>
Diffstat (limited to 'src/features/ark.js')
| -rw-r--r-- | src/features/ark.js | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/src/features/ark.js b/src/features/ark.js index ca718ee..6584dc7 100644 --- a/src/features/ark.js +++ b/src/features/ark.js @@ -453,8 +453,31 @@ export function arkFeature(ctx) { }, balanceLines() { const b = arkBalance(); - if (!b || (b.spendableSat + b.pendingSat) <= 0) return []; - return [{ label: t('arkBalance'), sat: b.spendableSat + b.pendingSat }]; + if (!b) return []; + const lines = []; + if (b.spendableSat + b.pendingSat > 0) lines.push({ label: t('arkBalance'), sat: b.spendableSat + b.pendingSat }); + // A board in flight: the sats already left the on-chain balance, so show + // where they went instead of having them silently disappear. + if (b.boardingSat > 0) lines.push({ label: t('arkBoarding'), sat: b.boardingSat }); + return lines; + }, + decorateTxRow(tx) { + if (tx.net >= 0 || !ark || !ark.state) return null; + const a = ark.state.actions.find((x) => x.type === 'board' && x.fundingTxid === tx.txid); + if (!a) return null; + return { icon: '⚔', label: h('span', {}, t('arkBoardHistory')) }; + }, + txDetailSection(tx) { + if (!ark || !ark.state) return null; + const a = ark.state.actions.find((x) => x.type === 'board' && x.fundingTxid === tx.txid); + if (!a) return null; + const done = a.step === 'done'; + return h('div', { class: 'summary col', style: 'gap:0' }, + h('div', { style: 'font-weight:600;margin:12px 0 2px' }, '⚔ ' + t('arkBoardHistory')), + h('div', { class: 'line' }, + h('span', { class: 'k' }, t('arkBalance')), + h('span', { class: 'v' }, '+' + fmtAmount(a.amountSat - a.feeSat) + ' ' + unitLabel())), + done ? null : h('div', { class: 'small muted', style: 'margin-top:2px' }, t('arkBoardedNote'))); }, settingsCards() { return [arkCard()]; }, }; |
