From 95d7dc049dfdd9d3beba54aef7921ec3a2816d71 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 16 Mar 2023 23:00:51 -0700 Subject: prettier --- routes/payments.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'routes/payments.js') diff --git a/routes/payments.js b/routes/payments.js index c09fcf93..b8999f55 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -35,10 +35,9 @@ catchUp(); export default { async create({ body, user }, res) { - let { amount, hash, maxfee, name, memo, payreq, username } = body; + let { amount, hash, maxfee, name, memo, payreq, username } = body; try { - amount = parseInt(amount); maxfee = maxfee ? parseInt(maxfee) : 0; @@ -414,10 +413,10 @@ export default { for (let pid of payments) { let p = await g(`payment:${pid}`); total += p.amount; - if (p.amount < 0) total -= ((p.fee || 0) + (p.ourfee || 0)); - } + if (p.amount < 0) total -= (p.fee || 0) + (p.ourfee || 0); + } - l('corrected balance', username, uid, balance, total); + l("corrected balance", username, uid, balance, total); await s(`balance:${uid}`, total); res.send("ok"); } catch (e) { -- cgit v1.2.3