diff options
| -rw-r--r-- | routes/liquid/fee.js | 4 | ||||
| -rw-r--r-- | routes/users.js | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/routes/liquid/fee.js b/routes/liquid/fee.js index 6a884657..d43e6e9d 100644 --- a/routes/liquid/fee.js +++ b/routes/liquid/fee.js @@ -16,7 +16,7 @@ module.exports = async (req, res) => { tx = await lq.createRawTransaction( [], { - [address]: fixed(amount, 8), + [address]: (amount / SATS).toFixed(8) }, 0, false, @@ -45,7 +45,7 @@ module.exports = async (req, res) => { res.send({ feeRate, tx }); } catch (e) { - l.error("error estimating liquid fee", e); + l.error("error estimating liquid fee", e.message); return res.status(500).send(e.message); } }; diff --git a/routes/users.js b/routes/users.js index bc4debdf..f5c8df03 100644 --- a/routes/users.js +++ b/routes/users.js @@ -83,6 +83,7 @@ app.post("/register", async (req, res) => { let ip = req.headers["x-forwarded-for"] || req.connection.remoteAddress; + let success, score; try { const url = `https://www.google.com/recaptcha/api/siteverify?secret=${config.captcha}&response=${user.token}&remoteip=${ip}`; let captcha = await axios.post( @@ -95,7 +96,7 @@ app.post("/register", async (req, res) => { { timeout: 1000 } ); - let { success, score } = captcha.data; + ({ success, score } = captcha.data); if (!success || score < 0.3) { l.warn("failed registration attempt", ip); @@ -157,7 +158,7 @@ app.post("/register", async (req, res) => { user = await getUser(user.username); res.send(pick(user, ...whitelist)); emit(user.username, "user", user); - l.info("new user", user.username, ip); + l.info("new user", user.username, ip, token, score); }); app.post("/disable2fa", auth, twofa, async (req, res) => { |
