aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-04-06 15:24:59 -0700
committerAdam Soltys <[email protected]>2023-04-06 15:24:59 -0700
commit5083648dc113547c1c604e0c93ed0ee961f01ea3 (patch)
tree2bf730ad9ff666bbc1dc52b6bc03976b715da22d /routes
parent3f7bcceaa075ebf5f7ed41276a5be0ae2d168ff6 (diff)
downloadcoinos-server-5083648dc113547c1c604e0c93ed0ee961f01ea3.tar.gz
coinos-server-5083648dc113547c1c604e0c93ed0ee961f01ea3.zip
set maxfee on lightning payments
Diffstat (limited to 'routes')
-rw-r--r--routes/payments.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/routes/payments.js b/routes/payments.js
index a8cffa50..5985f2ed 100644
--- a/routes/payments.js
+++ b/routes/payments.js
@@ -71,7 +71,11 @@ export default {
let r;
try {
- r = await ln.pay(payreq, msatoshi ? undefined : `${amount}sats`);
+ r = await ln.pay({
+ bolt11: payreq.replace(/\s/g, "").toLowerCase(),
+ amount_msat: msatoshi ? undefined : `${amount}sats`,
+ maxfee,
+ });
if (r.status !== "complete") fail("payment did not complete");
p.amount = -amount;