From 635ca5ad96c791bdd229f50c138b4f3292ae29ad Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 5 Feb 2026 11:13:27 -0800 Subject: fix ark handling --- routes/payments.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/routes/payments.ts b/routes/payments.ts index 5e31d8b8..e3cd8e5e 100644 --- a/routes/payments.ts +++ b/routes/payments.ts @@ -839,12 +839,15 @@ export default { created: Date.now(), }; - const m = await db.multi(); + const m = db.multi(); m.set(`invoice:${invoice.id}`, JSON.stringify(invoice)) .set(`payment:${p.id}`, JSON.stringify(p)) .lPush(`${aid || uid}:payments`, p.id) - .set(`${aid || uid}:payments:last`, p.created) - .exec(); + .set(`${aid || uid}:payments:last`, p.created); + + if (hash) m.set(`payment:${aid || uid}:${hash}`, p.id); + + await m.exec(); await completePayment(invoice, p, user); @@ -880,7 +883,7 @@ export default { aid, amount: tx.amount, hash: tx.hash, - confirmed: tx.settled, + confirmed: true, rate, currency, type: PaymentType.ark, -- cgit v1.2.3