aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-03-05 15:06:22 -0800
committerAdam Soltys <[email protected]>2025-03-05 15:06:48 -0800
commit217caa8334fe3f51e7760c1921c9e000858ac845 (patch)
treecb77858a51cf5625833b5323d3faafae4c064916 /lib
parentbbdae13248476e9ff49fcefc64cf8c8e97b5f679 (diff)
downloadcoinos-server-217caa8334fe3f51e7760c1921c9e000858ac845.tar.gz
coinos-server-217caa8334fe3f51e7760c1921c9e000858ac845.zip
nwc max fee
Diffstat (limited to 'lib')
-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,
});