From 506627db3b5b0f7e0558db1ff4fc3c7580580cb9 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 29 Aug 2022 14:26:43 -0700 Subject: only add conversion fee to L-BTC payments --- routes/liquid/send.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/routes/liquid/send.js b/routes/liquid/send.js index b844590d..c6512a89 100644 --- a/routes/liquid/send.js +++ b/routes/liquid/send.js @@ -86,9 +86,6 @@ sendLiquid = async ({ asset, amount, user, address, memo, tx, limit }) => { total += fee - covered; } - // get conversion fee - // 'total' refers to the total before the conversion fee - // (i.e. the total liquid bitcoin that leaves this server) var conversionFee = computeConversionFee(amount); if (limit && total > limit + fee) @@ -116,6 +113,8 @@ sendLiquid = async ({ asset, amount, user, address, memo, tx, limit }) => { conversionFee -= conversionFeeDeduction; } + if (asset !== btc) conversionFee = 0; + if (total > account.balance) { l.warn("amount exceeds balance", { total, -- cgit v1.2.3