aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/ark.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-31 09:28:48 -0700
committerAdam Soltys <[email protected]>2026-08-31 09:28:48 -0700
commit193f49a7a4fb73ef7bfa405c17e8da3ab94f4205 (patch)
tree54f7ed13d35cc58fea45e20504fc09e538c4f3e7 /src/features/ark.js
parent29b0dddad8edde818d0257f39988c9e82f387290 (diff)
downloadcoinosv3-193f49a7a4fb73ef7bfa405c17e8da3ab94f4205.tar.gz
coinosv3-193f49a7a4fb73ef7bfa405c17e8da3ab94f4205.zip
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
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MrkLsNScXe9b6BviUSdmMr
Diffstat (limited to 'src/features/ark.js')
-rw-r--r--src/features/ark.js14
1 files changed, 12 insertions, 2 deletions
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;
}