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 | |
| parent | 99860c48bc27f17d8c593dcfbaab494092e5b19c (diff) | |
| download | coinos-server-60080d284f8d740cc9e1e42c7a4359053dedfb68.tar.gz coinos-server-60080d284f8d740cc9e1e42c7a4359053dedfb68.zip | |
limit withdrawals
| -rw-r--r-- | index.js | 2 | ||||
| -rw-r--r-- | lib/payments.js | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -64,7 +64,7 @@ app.post("/take", auth, payments.take); app.post("/print", auth, payments.print); app.post("/send/:lnaddress/:amount", auth, payments.lnaddress); app.post("/gateway", payments.gateway); -app.post("/replace", auth, payments.replace); +// app.post("/replace", auth, payments.replace); app.get("/encode", lnurl.encode); app.get("/decode", lnurl.decode); 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]; |
