diff options
| author | Adam Soltys <[email protected]> | 2022-08-29 14:26:43 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-08-29 14:26:43 -0700 |
| commit | 506627db3b5b0f7e0558db1ff4fc3c7580580cb9 (patch) | |
| tree | c0883885f508798fa5731c3ac64cfb93b3658c9f | |
| parent | ff2e503ec80b113031b626efd011a98ba22ad69b (diff) | |
| download | coinos-server-506627db3b5b0f7e0558db1ff4fc3c7580580cb9.tar.gz coinos-server-506627db3b5b0f7e0558db1ff4fc3c7580580cb9.zip | |
only add conversion fee to L-BTC payments
| -rw-r--r-- | routes/liquid/send.js | 5 |
1 files 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, |
