diff options
| author | Adam Soltys <[email protected]> | 2026-02-05 11:13:27 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-06 09:00:10 -0800 |
| commit | 635ca5ad96c791bdd229f50c138b4f3292ae29ad (patch) | |
| tree | fa52c26a5feed92c75fa815b7cbebb90370324b3 | |
| parent | 7c40346355346fb59a86d11cdbef1a7da00e8da8 (diff) | |
| download | coinos-server-635ca5ad96c791bdd229f50c138b4f3292ae29ad.tar.gz coinos-server-635ca5ad96c791bdd229f50c138b4f3292ae29ad.zip | |
fix ark handling
| -rw-r--r-- | routes/payments.ts | 11 |
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, |
