aboutsummaryrefslogtreecommitdiffstats
path: root/lib/payments.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-11-18 08:45:38 -0800
committerAdam Soltys <[email protected]>2024-11-18 08:45:38 -0800
commit947474e5e507b2bfcec5aeb2b0ad8e058703dbd7 (patch)
treeca1fe8781af1ff228476aae2ae47cfe68544ff25 /lib/payments.ts
parent0acff5707d6838c14defef2bf0d08a7281a44a21 (diff)
downloadcoinos-server-947474e5e507b2bfcec5aeb2b0ad8e058703dbd7.tar.gz
coinos-server-947474e5e507b2bfcec5aeb2b0ad8e058703dbd7.zip
20s retry
Diffstat (limited to 'lib/payments.ts')
-rw-r--r--lib/payments.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/payments.ts b/lib/payments.ts
index ae36725b..e950786f 100644
--- a/lib/payments.ts
+++ b/lib/payments.ts
@@ -459,6 +459,7 @@ export const sendLightning = async ({
bolt11: pr.replace(/\s/g, "").toLowerCase(),
amount_msat: amount_msat ? undefined : amount * 1000,
maxfee: maxfee ? maxfee * 1000 : 0,
+ retry_for: 20,
});
try {
@@ -701,7 +702,7 @@ export const check = async () => {
for (const pr of payments) {
const p = await getPayment(pr);
- if (!p || Date.now() - p.created < 60000) continue;
+ if (!p || Date.now() - p.created < 20000) continue;
const { pays } = await ln.listpays(pr);
const failed = !pays.length || pays.every((p) => p.status === "failed");