From e343c8b07794a86156601efebe58b443b15b10da Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 17 Jun 2021 17:05:09 -0400 Subject: add fee to total --- routes/liquid/send.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/routes/liquid/send.js b/routes/liquid/send.js index 19b7344f..6455736c 100644 --- a/routes/liquid/send.js +++ b/routes/liquid/send.js @@ -75,12 +75,12 @@ sendLiquid = async ({ asset, amount, user, address, memo, tx, limit }) => { await faucet.reload({ transaction }); await faucet.save({ transaction }); } - - total += fee - covered; } + + total += fee - covered; } - if (limit && total > limit) + if (limit && total > limit + fee) throw new Error("Tx amount exceeds authorized amount"); if (asset !== btc || total) { -- cgit v1.2.3