aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
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(