diff options
| author | Adam Soltys <[email protected]> | 2023-03-16 23:00:51 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-03-16 23:01:13 -0700 |
| commit | 95d7dc049dfdd9d3beba54aef7921ec3a2816d71 (patch) | |
| tree | 480bba41c6126c5d23d28cf8894b13ddb5ae33c4 /routes/payments.js | |
| parent | 013dffcbd0bdc901dc977af7c09daffe639614ee (diff) | |
| download | coinos-server-95d7dc049dfdd9d3beba54aef7921ec3a2816d71.tar.gz coinos-server-95d7dc049dfdd9d3beba54aef7921ec3a2816d71.zip | |
prettier
Diffstat (limited to 'routes/payments.js')
| -rw-r--r-- | routes/payments.js | 9 |
1 files changed, 4 insertions, 5 deletions
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) { |
