aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/register.js31
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/register.js b/lib/register.js
index bc17496e..c8aa8e5d 100644
--- a/lib/register.js
+++ b/lib/register.js
@@ -2,36 +2,6 @@ const authenticator = require("otplib").authenticator;
const axios = require("axios");
const bcrypt = require("bcrypt");
-const DAY = 24 * 60 * 60 * 1000;
-
-let faucet = 1000;
-setInterval(() => (faucet = 2000), DAY);
-
-const gift = async user => {
- const account = user.accounts[0];
-
- if (faucet > 0) {
- faucet -= 100;
-
- account.balance = 100;
- await account.save();
-
- const payment = await db.Payment.create({
- account_id: account.id,
- user_id: user.id,
- hash: "Welcome Gift",
- amount: 100,
- currency: user.currency,
- rate: app.get("rates")[user.currency],
- received: true,
- confirmed: 1,
- network: "GIFT"
- });
-
- await user.save();
- }
-};
-
register = async (user, ip, requireChallenge) => {
if (!(user && user.username)) throw new Error("Username required");
@@ -111,7 +81,6 @@ register = async (user, ip, requireChallenge) => {
if (Number.isInteger(numericIp)) {
user.ip = numericIp;
const ipExists = await db.User.findOne({ where: { ip: numericIp } });
- if (!ipExists) await gift(user);
}
user.account_id = account.id;