From fd60875c2233ad4e367a501825f5e3e37bb2dec6 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 30 Oct 2026 15:57:46 -0700 Subject: A wallet that renews its own coins (Settings → Spending: self or exit) pays a Lightning invoice from the coins nearest expiry first, so fewer of them come up for a paid renewal (Stacker News request, 2026-10-29). Lightning sends only: the ASP takes those coins, whereas an Ark-to-Ark send would hand the recipient your short timelocks. The custodial default keeps the smallest coin that covers the payment (expiry costs nothing there), a coin past its timelock still goes last, and a pile of old crumbs that would breach the input cap falls back to largest-first. The closed-app NWC worker follows the mirrored tier the same way MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VMan6VLgQdujavxPsfU7A9 --- src/features/ark.js | 1 + 1 file changed, 1 insertion(+) (limited to 'src/features') diff --git a/src/features/ark.js b/src/features/ark.js index b8e83a7..8b3121c 100644 --- a/src/features/ark.js +++ b/src/features/ark.js @@ -646,6 +646,7 @@ export function arkFeature(ctx) { arkPersistFlushers.add(flushPersist); const mgr = new ArkManager({ account: wallet.account(), + lnOldestFirst: () => getCustody() !== 'custodial', storage: { load: () => wallet.loadArkState(cfg.ark), adopt: (serverPubkey) => wallet.adoptArkState(serverPubkey, cfg.ark), -- cgit v1.2.3