diff options
| author | Adam Soltys <[email protected]> | 2024-02-21 18:49:38 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-02-21 18:49:38 +0000 |
| commit | 60080d284f8d740cc9e1e42c7a4359053dedfb68 (patch) | |
| tree | b451c1393f255ea9b69d4af743169acf5ae57184 /lib | |
| parent | 99860c48bc27f17d8c593dcfbaab494092e5b19c (diff) | |
| download | coinos-server-60080d284f8d740cc9e1e42c7a4359053dedfb68.tar.gz coinos-server-60080d284f8d740cc9e1e42c7a4359053dedfb68.zip | |
limit withdrawals
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/payments.js | 2 |
1 files changed, 2 insertions, 0 deletions
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]; |
