diff options
| author | Adam Soltys <[email protected]> | 2026-08-01 15:45:55 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-08-01 15:45:55 -0700 |
| commit | 46cbe94159fe65d8cb6a944b52a9ead6c53e7a3c (patch) | |
| tree | aa8051a3523d72b273ae72bb458056813e48aaff /src/features | |
| parent | d554a13cf4560891010f50e117754825c1f1be7a (diff) | |
| download | coinosv3-46cbe94159fe65d8cb6a944b52a9ead6c53e7a3c.tar.gz coinosv3-46cbe94159fe65d8cb6a944b52a9ead6c53e7a3c.zip | |
Reconcile vtxos against the server before a headless NWC payment
The sync merge is additive by design, so a vtxo spent on one device can
survive in another device's state looking spendable. The interactive
send path reconciles on intent; the NWC path connected and spent blind,
so a wallet answering from stale state picked an already-spent coin and
the ASP refused with 'vtxo … is not spendable (state: spent)'.
Co-Authored-By: Claude Fable 5 <[email protected]>
Diffstat (limited to 'src/features')
| -rw-r--r-- | src/features/ark.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/features/ark.js b/src/features/ark.js index 9621c4b..1c0ad1b 100644 --- a/src/features/ark.js +++ b/src/features/ark.js @@ -554,6 +554,11 @@ export function arkFeature(ctx) { throw new Error(`amount ${dec.amountSat} exceeds the limit of ${maxAmountSat} sat`); } const mgr = await connectArk(); + // The sync merge is additive, so a vtxo spent on another device can sit + // in local state looking spendable until someone checks. The interactive + // send path reconciles on intent; this headless path must too, or an NWC + // payment picks the stale coin and the ASP rejects it ("state: spent"). + await mgr.reconcile().catch(() => {}); // 1. the bridge, when one is configured and can take it try { |
