From b07b5ed56a4403cf7d8a0587aba54a342c3b51f7 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 16 Apr 2025 21:28:47 -0700 Subject: fix platform fees --- lib/payments.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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( -- cgit v1.2.3