From 55d4763146916e7e168bdc0ffd6d97c0d82f8e83 Mon Sep 17 00:00:00 2001 From: Adrien Hopkins Date: Thu, 16 Jun 2022 10:52:56 -0500 Subject: Added Lightning conversion fees (currently 0%) --- routes/lightning/conversionFee.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 routes/lightning/conversionFee.js (limited to 'routes/lightning/conversionFee.js') diff --git a/routes/lightning/conversionFee.js b/routes/lightning/conversionFee.js new file mode 100644 index 00000000..8fca9b0f --- /dev/null +++ b/routes/lightning/conversionFee.js @@ -0,0 +1,12 @@ +// Code for the conversion fee +// This is in a separate file so that the same function can be used by ./send and ./receive + +const conversionFeeMultiplier = 0.00; +const conversionFeeReceiver = "coinosfees"; // account that receives the fees + +/** + * Returns the fee you have to pay for withdrawing 'amount' lightning BTC. + */ +function computeConversionFee(amount) { + return Math.floor(amount * conversionFeeMultiplier); +} -- cgit v1.2.3