aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-04-16 21:28:47 -0700
committerAdam Soltys <[email protected]>2025-04-16 21:28:51 -0700
commitb07b5ed56a4403cf7d8a0587aba54a342c3b51f7 (patch)
tree3289270039b969b3bddb0462bbefd7e208add34b /lib
parentd18ad032bc2e97bbf0aa2903dca0734dc32e2093 (diff)
downloadcoinos-server-b07b5ed56a4403cf7d8a0587aba54a342c3b51f7.tar.gz
coinos-server-b07b5ed56a4403cf7d8a0587aba54a342c3b51f7.zip
fix platform fees
Diffstat (limited to 'lib')
-rw-r--r--lib/payments.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/payments.ts b/lib/payments.ts
index 2a2176e6..b3581847 100644
--- a/lib/payments.ts
+++ b/lib/payments.ts
@@ -119,7 +119,7 @@ export const debit = async ({
? Math.round((amount + fee + tip) * config.fee[creditType])
: 0;
- if (aid) ourfee = 0;
+ if (aid && aid !== uid) ourfee = 0;
ourfee = await db.debit(
`balance:${aid || uid}`,
@@ -696,7 +696,7 @@ export const build = async ({
const covered = Math.min(credit, ourfee);
ourfee -= covered;
- if (aid) ourfee = 0;
+ if (aid && aid !== user.id) ourfee = 0;
if (subtract || amount + fee + ourfee > balance) {
if (amount <= fee + ourfee + dust)
fail(