aboutsummaryrefslogtreecommitdiffstats
path: root/src/features
diff options
context:
space:
mode:
Diffstat (limited to 'src/features')
-rw-r--r--src/features/hats.js7
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;
}