aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--routes/bitcoin/send.js2
-rw-r--r--routes/liquid/send.js1
2 files changed, 2 insertions, 1 deletions
diff --git a/routes/bitcoin/send.js b/routes/bitcoin/send.js
index efcedb38..a9c95b31 100644
--- a/routes/bitcoin/send.js
+++ b/routes/bitcoin/send.js
@@ -68,11 +68,11 @@ module.exports = ah(async (req, res) => {
}
// use user's credits to reduce fee, if available
- console.log(account.fee_credits);
let withdrawalFeeDeduction = Math.min(account.fee_credits, withdrawalFee);
if (withdrawalFeeDeduction) {
await account.decrement({ fee_credits: withdrawalFeeDeduction }, { transaction });
await account.reload({ transaction });
+ withdrawalFee -= withdrawalFeeDeduction;
}
await account.decrement({ balance: (total + withdrawalFee) }, { transaction });
diff --git a/routes/liquid/send.js b/routes/liquid/send.js
index 8e21e4d4..fcb05942 100644
--- a/routes/liquid/send.js
+++ b/routes/liquid/send.js
@@ -137,6 +137,7 @@ sendLiquid = async ({ asset, amount, user, address, memo, tx, limit }) => {
if (withdrawalFeeDeduction) {
await account.decrement({ fee_credits: withdrawalFeeDeduction }, { transaction });
await account.reload({ transaction });
+ withdrawalFee -= withdrawalFeeDeduction;
}
await account.decrement({ balance: (total + withdrawalFee)}, { transaction });