aboutsummaryrefslogtreecommitdiffstats
path: root/lib/payments.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-01-31 20:03:04 -0800
committerAdam Soltys <[email protected]>2023-01-31 20:03:04 -0800
commit2eb199b8609b0976b4800815edcf73aa3da4b464 (patch)
tree62c567a3f506afba9a592731abd7bc2a63ab0b97 /lib/payments.js
parent283ffc9d8442ecbbc85c0c40167cc03f20f64a40 (diff)
downloadcoinos-server-2eb199b8609b0976b4800815edcf73aa3da4b464.tar.gz
coinos-server-2eb199b8609b0976b4800815edcf73aa3da4b464.zip
account migration
Diffstat (limited to 'lib/payments.js')
-rw-r--r--lib/payments.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/payments.js b/lib/payments.js
index d0593447..cc8747d7 100644
--- a/lib/payments.js
+++ b/lib/payments.js
@@ -34,7 +34,7 @@ export let debit = async (
if (!amount || amount < 0) fail("Amount must be greater than zero");
- let ourfee = Math.round(amount * config.fee);
+ let ourfee = type === types.internal ? 0 : Math.round(amount * config.fee);
await t(`balance:${uid}`, async (balance, db) => {
await t(`credit:${type}:${uid}`, async (credit, db) => {
let covered = Math.min(credit, ourfee) || 0;