diff options
| author | Adam Soltys <[email protected]> | 2026-08-31 08:29:49 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-08-31 08:29:49 -0700 |
| commit | 03d471d5abd4447d96daca869de9d8d4fcf3283f (patch) | |
| tree | cd102f519e1587c862a63faf4524493f3b43e2a7 | |
| parent | ea5803ff062be5012ec7ccf998f42063f18b8b8d (diff) | |
| download | coinosv3-03d471d5abd4447d96daca869de9d8d4fcf3283f.tar.gz coinosv3-03d471d5abd4447d96daca869de9d8d4fcf3283f.zip | |
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
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MrkLsNScXe9b6BviUSdmMr
| -rw-r--r-- | src/features/hats.js | 7 |
1 files 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; } |
