From c553ea40de4aecd9453272599d450310d6e306b0 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 18 Aug 2026 11:49:56 -0700 Subject: Money stops arriving without a story: the mailbox checkpoint stays local reading progress (a merged one skipped every unprocessed message), vtxos that beat their message here get a backfilled receive, and the commit stamp takes its own footer line Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01JtaatFfAbx91Nh3xqKVqKz --- src/ark/manager.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/ark') diff --git a/src/ark/manager.js b/src/ark/manager.js index eb23b51..99ae2c5 100644 --- a/src/ark/manager.js +++ b/src/ark/manager.js @@ -298,7 +298,16 @@ export class ArkManager { const ourKeys = [hex.encode(this._key(0).pubkey)]; const tip = await this._tipMemo(); for (const v of m.vtxos) { - if (this._vtxo(v.id)) continue; + if (this._vtxo(v.id)) { + // The vtxo beat the message here (a mirror or snapshot merge carried + // it) — the money is present but the story is missing. Backfill the + // receive movement so history matches the balance. + if (!this.state.movements.some((x) => x.vtxoId === v.id)) { + this._movement({ type: 'receive', amountSat: v.amountSat, status: 'complete', vtxoId: v.id, ts: this._estimateReceiveTs(this._decoded(this._vtxo(v.id)), tip) }); + changed = true; + } + continue; + } try { await validateVtxo(v, { serverPubkey: this.serverPub, chain: this.chain, expectPubkeys: ourKeys }); } catch (e) { -- cgit v1.2.3