From 280bbfd09f9bc7c948f77d4e362cc3b32d4fcfc1 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 30 Aug 2026 22:42:53 -0700 Subject: One spend, one row: send and lightning-pay movements now record which coins they consumed, spend actions sync as slivers (id + net amount + inputIds), and the reconcile exclusion generalizes from renewals to ANY accounted-for coin — a laptop send used to paint the phone's history twice, once as the real Sent and once as a red 'Spent on another device' at full input magnitude. The red row survives only for spends nothing anywhere explains MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01MrkLsNScXe9b6BviUSdmMr --- src/ark/manager.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ark') diff --git a/src/ark/manager.js b/src/ark/manager.js index e60d2f3..492906d 100644 --- a/src/ark/manager.js +++ b/src/ark/manager.js @@ -755,6 +755,9 @@ export class ArkManager { this._movement({ type: 'send', amountSat: action.amountSat, status: 'complete', to: action.destAddress, vtxoId: decodeVtxo(hex.decode(destList()[0])).id, + // which coins this spend consumed — synced, so other devices can + // skip the "spent on another device" row these inputs would earn + inputIds: (action.parts || []).map((p2) => p2.inputId).filter(Boolean), }); this._save(); } @@ -1055,6 +1058,7 @@ export class ArkManager { type: 'ln-send', amountSat: action.amountSat, status: 'complete', detail: action.feeSat ? `fee ${action.feeSat} sat` : undefined, invoice: action.invoice, preimage: preimageHex, paymentHash: action.paymentHash, + inputIds: (action.parts || []).map((p2) => p2.inputId).concat(action.inputId ? [action.inputId] : []).filter(Boolean), }); this._save(); } -- cgit v1.2.3