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/nwc-respond.js | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nwc-respond.js') diff --git a/src/nwc-respond.js b/src/nwc-respond.js index 04340d0..12101f5 100644 --- a/src/nwc-respond.js +++ b/src/nwc-respond.js @@ -91,6 +91,7 @@ export async function bgManager(rec, walletKey, saveFn, log = null) { account: shimAccount(rec), storage, arkUrl: rec.ark.arkUrl, esploraUrl: rec.ark.esploraUrl, network: rec.ark.network, honorsExpired: !!rec.ark.honorsExpired, + lnOldestFirst: () => !!rec.custody && rec.custody !== 'custodial', }).init(); } -- cgit v1.2.3