From 217caa8334fe3f51e7760c1921c9e000858ac845 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 5 Mar 2025 15:06:22 -0800 Subject: nwc max fee --- lib/nwc.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/nwc.ts b/lib/nwc.ts index 3b04eecf..81476248 100644 --- a/lib/nwc.ts +++ b/lib/nwc.ts @@ -108,7 +108,7 @@ const handle = (method, params, ev, app, user) => const { amount_msat, payee } = await ln.decode(pr); const { id } = await ln.getinfo(); const amount = Math.round(amount_msat / 1000); - const { max_amount, budget_renewal, pubkey, created } = app; + const { max_amount, max_fee, budget_renewal, pubkey, created } = app; const periods = { daily: 60 * 60 * 24 * 1000, @@ -197,6 +197,7 @@ const handle = (method, params, ev, app, user) => const { id: pid } = await sendLightning({ amount, + fee: max_fee || Math.round(amount * 0.01), user, pr, }); -- cgit v1.2.3