From 193f49a7a4fb73ef7bfa405c17e8da3ab94f4205 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 31 Aug 2026 09:28:48 -0700 Subject: The chain adapter learns a second road: mainnet esplora calls fail over between the configured host, blockstream.info, and mempool.space (remembering whichever answered last, rotating on network failures, 429s and 5xx) — one tester's network simply cannot reach mempool.space and every chain-touching feature was dying for it, stranded mailbox receives included. And a failed quote no longer wedges the Lightning pay form at an eternal spinner: it prices at the outage fallback and lets Pay proceed, where the payment path quotes again for real MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01MrkLsNScXe9b6BviUSdmMr --- src/features/ark.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/features') diff --git a/src/features/ark.js b/src/features/ark.js index 2ce26b5..b123458 100644 --- a/src/features/ark.js +++ b/src/features/ark.js @@ -719,8 +719,18 @@ export function arkFeature(ctx) { ui.arkLnPay = { invoice, meta: meta || null, amountSat: dec.amountSat, amount: '', feeSat: null, status: 'quote' }; ui.sendError = ''; render(); - quoteArkLnPay(invoice, meta).catch((e) => { - if (ui.arkLnPay && ui.arkLnPay.invoice === invoice) { ui.sendError = e.message; render(); } + quoteArkLnPay(invoice, meta).catch(() => { + // The quote is a nicety — a dead esplora or quote service must not + // wedge the form at an eternal spinner (it did: "Getting a quote…" + // above a Failed-to-fetch, Pay unreachable). Price it like the outage + // fallback and let Pay proceed; the payment path quotes again with + // its own fallbacks and locks only what the route actually needs. + const p2 = ui.arkLnPay; + if (!p2 || p2.invoice !== invoice) return; + p2.feeSat = p2.amountSat ? Math.max(3, Math.ceil(p2.amountSat / 1000)) : null; + p2.status = 'ready'; + ui.sendError = ''; + render(); }); return true; } -- cgit v1.2.3