diff options
| author | Adam Soltys <[email protected]> | 2020-05-14 19:55:25 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-05-14 19:55:25 -0700 |
| commit | a9a061656668965fbf627ae73165d361d8ca9183 (patch) | |
| tree | a007ff73994096c0fa361565c496602741622e9b | |
| parent | 8a5496b3cd2e898e204367b8ca7c6e8f4d7b6055 (diff) | |
| download | coinos-server-a9a061656668965fbf627ae73165d361d8ca9183.tar.gz coinos-server-a9a061656668965fbf627ae73165d361d8ca9183.zip | |
remove liquidate migration helper
| -rw-r--r-- | routes/users.js | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/routes/users.js b/routes/users.js index e08d4790..72c8049c 100644 --- a/routes/users.js +++ b/routes/users.js @@ -22,42 +22,6 @@ const twofa = (req, res, next) => { } else next(); }; -app.get("/liquidate", async (req, res) => { - let users = await db.User.findAll({ - include: { model: db.Account, as: "accounts" }, - }); - - if (config.liquid.walletpass) - await lq.walletPassphrase(config.liquid.walletpass, 300); - - for (let i = 0; i < users.length; i++) { - let user = users[i]; - if (!user.confidential) { - user.confidential = await lq.getNewAddress(); - user.liquid = (await lq.getAddressInfo(user.confidential)).unconfidential; - await user.save(); - } - - if (!user.otpsecret) { - user.otpsecret = authenticator.generateSecret(); - await user.save(); - } - - if (!user.accounts.length) { - await db.Account.create({ - user_id: user.id, - asset: config.liquid.btcasset, - balance: user.balance, - pending: 0, - ticker: "BTC", - name: "Bitcoin", - precision: 8, - }); - } - } - res.end(); -}); - const gift = async (user) => { const account = user.accounts[0]; |
