From 03d471d5abd4447d96daca869de9d8d4fcf3283f Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 31 Aug 2026 08:29:49 -0700 Subject: The wizard hat stops demanding 42k sats of phantom headroom: the shop's affordability check drops from 2% to max(10, 0.2%) routing allowance — hat invoices live on the ASP's own node where the quoted route fee is a couple of sats, and a wallet holding 2,133,786 was told it couldn't afford a 2,100,000 hat 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/hats.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/features/hats.js b/src/features/hats.js index 37997f4..11fe400 100644 --- a/src/features/hats.js +++ b/src/features/hats.js @@ -242,8 +242,11 @@ export function hatsFeature(ctx) { if (!['mainnet', 'mutinynet'].includes(getNetwork())) { toast(t('hatMainnetOnly')); return; } if (!hook('arkReady')) { toast(t('hatNeedSpending')); return; } const spendable = hook('arkSpendableSat') || 0; - // routing fee headroom: the ASP charges the quoted route fee (~1%) - if (spendable < price + Math.ceil(price * 0.02) + 2) { + // Routing headroom, honestly sized: the hat invoice lives on the ASP's + // own node, so the quoted route fee is ~0–2 sats. The old 2% guard + // demanded 42k sats of phantom headroom on the wizard hat and told a + // wallet holding 2,133,786 that it couldn't afford 2,100,000. + if (spendable < price + Math.max(10, Math.ceil(price * 0.002))) { toast(t('hatNoFunds', { sats: fmtSats(price) })); return; } -- cgit v1.2.3