diff options
| author | Adam Soltys <[email protected]> | 2023-05-12 10:27:44 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-05-12 10:27:44 -0700 |
| commit | 52e8cc92866da41e58aae2ea3f495d85c8f4a161 (patch) | |
| tree | 51cb5e8d0704ad7d7213d785edb37d9b36975e38 | |
| parent | f502a78a29c41bfb0c842bbc061a51b7c6b105e5 (diff) | |
| download | coinos-server-52e8cc92866da41e58aae2ea3f495d85c8f4a161.tar.gz coinos-server-52e8cc92866da41e58aae2ea3f495d85c8f4a161.zip | |
more logs
| -rw-r--r-- | routes/payments.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/routes/payments.js b/routes/payments.js index 887d01ff..73ffa1df 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -95,8 +95,13 @@ export default { warn("something went wrong", e.message); if (!(r && r.status === "complete")) { let credit = Math.round(total * config.fee) - p.ourfee; + warn("crediting balance", total + maxfee + p.ourfee); await db.incrBy(`balance:${p.uid}`, total + maxfee + p.ourfee); + + warn("crediting credits", credit); await db.incrBy(`credit:${types.lightning}:${p.uid}`, credit); + + warn("reversing payment", p.id); await db.lRem(`${p.uid}:payments`, 1, p.id); await db.del(`payment:${p.id}`); } |
