aboutsummaryrefslogtreecommitdiffstats
path: root/lib/payments.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-12-01 11:36:35 -0800
committerAdam Soltys <[email protected]>2023-12-01 11:36:35 -0800
commit7709c1efde9a1f3078171ee56985cd25511d6f7b (patch)
treecd996eaaa860cdb3d7da688e0ad4c5ec7bae1a0c /lib/payments.js
parent826c7b361c93905c4725755038d398221530051d (diff)
downloadcoinos-server-7709c1efde9a1f3078171ee56985cd25511d6f7b.tar.gz
coinos-server-7709c1efde9a1f3078171ee56985cd25511d6f7b.zip
biome formatter
Diffstat (limited to 'lib/payments.js')
-rw-r--r--lib/payments.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/payments.js b/lib/payments.js
index f2fab1ba..5152806a 100644
--- a/lib/payments.js
+++ b/lib/payments.js
@@ -118,7 +118,7 @@ export let credit = async (hash, amount, memo, ref, type = types.internal) => {
return;
}
- let { tip } = invoice;
+ let { tip } = invoice;
tip = parseInt(tip) || 0;
if (!memo) ({ memo } = invoice);
@@ -243,10 +243,10 @@ export let payLightning = async (user, payreq, amount, maxfee, memo) => {
let r;
let { pays } = await ln.listpays(payreq);
- if (pays.find(p => p.status === "complete"))
+ if (pays.find((p) => p.status === "complete"))
fail("Invoice has already been paid");
- if (pays.find(p => p.status === "pending"))
+ if (pays.find((p) => p.status === "pending"))
fail("Payment is already underway");
p = await debit(payreq, total, maxfee, memo, user, types.lightning);
@@ -257,7 +257,7 @@ export let payLightning = async (user, payreq, amount, maxfee, memo) => {
let recordExists = !!(await g(`payment:${p.id}`));
let paymentFailed =
- !pays.length || pays.every(p => p.status === "failed");
+ !pays.length || pays.every((p) => p.status === "failed");
l("checking", payreq, recordExists, paymentFailed);