diff options
Diffstat (limited to 'routes/liquid/send.js')
| -rw-r--r-- | routes/liquid/send.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/routes/liquid/send.js b/routes/liquid/send.js index 1d12db30..7f7e1cb5 100644 --- a/routes/liquid/send.js +++ b/routes/liquid/send.js @@ -39,8 +39,9 @@ module.exports = ah(async (req, res) => { await db.transaction(async (transaction) => { for (let i = 0; i < assets.length; i++) { let asset = assets[i]; - let total = totals[asset]; - if (change[asset]) total -= change[asset]; + let amount = totals[asset]; + if (change[asset]) amount -= change[asset]; + let total = amount; if (asset === config.liquid.btcasset) total += fee; l.info("creating liquid payment", user.username, asset, total, fee); @@ -67,7 +68,7 @@ module.exports = ah(async (req, res) => { await account.save({ transaction }); let payment = { - amount: -total, + amount: -amount, account_id: account.id, fee, memo, |
