aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/payments.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/payments.js b/lib/payments.js
index db72de86..8806e6f8 100644
--- a/lib/payments.js
+++ b/lib/payments.js
@@ -49,13 +49,9 @@ export let debit = async (
await db
.multi()
.decrBy(`credit:${type}:${uid}`, covered)
+ .decrBy(`balance:${uid}`, amount + ourfee)
.exec();
});
-
- await db
- .multi()
- .decrBy(`balance:${uid}`, amount + (ourfee - credit))
- .exec();
});
let p = {