From 9963c4c45ccd33cc8588fd3c1cf816cf09a82c2b Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 22 Aug 2026 09:10:10 -0700 Subject: One record answers, and failure learns patience: a rewritten mirror disarms stale sibling copies of its connections, the responder pays from the record whose network the invoice names (standing down when none fits), a ghost coin reconciles and retries instead of dying, and error replies wait out a grace period so a sibling's success reaches the client first Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_017Fc8SHJRvBBXgMCntjNCri --- src/features/ark.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/features') diff --git a/src/features/ark.js b/src/features/ark.js index 30b167a..9aa43c2 100644 --- a/src/features/ark.js +++ b/src/features/ark.js @@ -7,7 +7,7 @@ import { HDKey } from '@scure/bip32'; import { hex, base32nopad, bech32 } from '@scure/base'; import { sha256 } from '@noble/hashes/sha256'; import { ArkManager } from '../ark/manager.js'; -import { loadBg, saveBg, buildBg } from '../nwc-bg.js'; +import { loadBg, saveBg, buildBg, disarmSiblingRecords } from '../nwc-bg.js'; import { boardFee } from '../ark/board.js'; import { maybeBolt11, lnSendFee } from '../ark/lightning.js'; import { decodeVtxo, getVtxoStatus, VTXO_STATE_SPENT, concatBytes } from '../ark/proto.js'; @@ -533,6 +533,7 @@ export function arkFeature(ctx) { if (prev) rec.spends = prev.spends; // the worker's log survives rewrites if (prefs) rec.prefs = prefs; // notification choices the worker honours await saveBg(wallet._cacheKey(), rec); + await disarmSiblingRecords(wallet._cacheKey(), rec).catch(() => {}); } // On connect, fold whatever the worker did while we were closed back into -- cgit v1.2.3