From db7e70fac51e16c7f389e031a80355b2d9d0f57e Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 5 Jul 2026 08:02:34 -0700 Subject: Boarding UX: label the funding tx and show an in-flight ark balance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/ark/manager.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/ark') diff --git a/src/ark/manager.js b/src/ark/manager.js index 310bab5..e35bb89 100644 --- a/src/ark/manager.js +++ b/src/ark/manager.js @@ -122,7 +122,13 @@ export class ArkManager { balance() { const sum = (st) => this.state.vtxos.filter((v) => v.state === st).reduce((n, v) => n + v.amountSat, 0); - return { spendableSat: sum('spendable'), pendingSat: sum('pending') }; + // Boards whose funding tx is broadcast but whose vtxo isn't registered yet: + // the sats have left the on-chain balance, so surface them here instead of + // letting them vanish until the board completes. + const boardingSat = this.state.actions + .filter((a) => a.type === 'board' && a.fundingTxid && !['done', 'failed'].includes(a.step)) + .reduce((n, a) => n + (a.amountSat - a.feeSat), 0); + return { spendableSat: sum('spendable'), pendingSat: sum('pending'), boardingSat }; } // Receives newer than the last acknowledgement — the UI's "Payment -- cgit v1.2.3