From 1c02aa63933a234faa45eecbfdc82dae7f6e174c Mon Sep 17 00:00:00 2001 From: Adrien Hopkins Date: Mon, 13 Jun 2022 09:50:50 -0500 Subject: Ensure a whole number of fee credits is given in transactions --- routes/liquid/receive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routes/liquid') diff --git a/routes/liquid/receive.js b/routes/liquid/receive.js index 6d4c128b..88166c91 100644 --- a/routes/liquid/receive.js +++ b/routes/liquid/receive.js @@ -343,7 +343,7 @@ setInterval(async () => { { pending: Math.min(p.account.pending, total) }, { transaction } ); - await account.increment({ fee_credits: total * withdrawalFeeMultiplier }, { transaction }); + await account.increment({ fee_credits: Math.floor(total * withdrawalFeeMultiplier) }, { transaction }); await p.account.reload({ transaction }); await p.save({ transaction }); -- cgit v1.2.3