aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-03-06 06:11:55 +0000
committerAdam Soltys <[email protected]>2026-03-06 06:11:55 +0000
commit69d17aea7e0cfdd6429fdbb07c2a1f5c7497e798 (patch)
tree9aa464996cf0c7a0e5b0e277f425a66649f61b8e /lib
parentf96e77c2e54398f9c4fc7a11a8479304170cb65a (diff)
downloadcoinos-server-69d17aea7e0cfdd6429fdbb07c2a1f5c7497e798.tar.gz
coinos-server-69d17aea7e0cfdd6429fdbb07c2a1f5c7497e798.zip
fix pending payment cleanup and login password verification
Skip non-lightning entries in pending payments check and handle malformed password hashes gracefully during login. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Diffstat (limited to 'lib')
-rw-r--r--lib/payments.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/payments.ts b/lib/payments.ts
index eed9b4c5..53b8dec1 100644
--- a/lib/payments.ts
+++ b/lib/payments.ts
@@ -778,6 +778,10 @@ export const check = async () => {
const payments = await db.sMembers("pending");
for (const pr of payments) {
+ if (!pr.startsWith("ln")) {
+ await db.sRem("pending", pr);
+ continue;
+ }
const p = await getPayment(pr);
if (!p || Date.now() - p.created < 10000) continue;
const { pays } = await ln.listpays(pr);