aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/nwc.ts3
1 files changed, 2 insertions, 1 deletions
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,
});