aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-05 11:13:27 -0800
committerAdam Soltys <[email protected]>2026-02-06 09:00:10 -0800
commit635ca5ad96c791bdd229f50c138b4f3292ae29ad (patch)
treefa52c26a5feed92c75fa815b7cbebb90370324b3
parent7c40346355346fb59a86d11cdbef1a7da00e8da8 (diff)
downloadcoinos-server-635ca5ad96c791bdd229f50c138b4f3292ae29ad.tar.gz
coinos-server-635ca5ad96c791bdd229f50c138b4f3292ae29ad.zip
fix ark handling
-rw-r--r--routes/payments.ts11
1 files 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,