From 60080d284f8d740cc9e1e42c7a4359053dedfb68 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 21 Feb 2024 18:49:38 +0000 Subject: limit withdrawals --- lib/payments.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/payments.js b/lib/payments.js index 2f603c98..754d2f0c 100644 --- a/lib/payments.js +++ b/lib/payments.js @@ -36,6 +36,8 @@ export let debit = async ({ type = types.internal, rate, }) => { + if (await g("freeze")) fail("Problem sending payment"); + if (!user.verified && amount > 1000000) fail(`⚡️${amount} exceeds max withdrawal of ⚡️1,000,000`); let ref; let { id: uid, currency, username } = user; if (!rate) rate = store.rates[currency]; -- cgit v1.2.3