diff options
| author | Adam Soltys <[email protected]> | 2021-06-17 17:05:09 -0400 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2021-06-17 17:05:30 -0400 |
| commit | e343c8b07794a86156601efebe58b443b15b10da (patch) | |
| tree | 15d00268a1290ad0106521a5a662b3d3c769be6c | |
| parent | fdbbb5af05c46a203032575a55ac66b655c801f1 (diff) | |
| download | coinos-server-e343c8b07794a86156601efebe58b443b15b10da.tar.gz coinos-server-e343c8b07794a86156601efebe58b443b15b10da.zip | |
add fee to total
| -rw-r--r-- | routes/liquid/send.js | 6 |
1 files 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) { |
