aboutsummaryrefslogtreecommitdiffstats
path: root/routes/lightning/conversionFee.js
diff options
context:
space:
mode:
Diffstat (limited to 'routes/lightning/conversionFee.js')
-rw-r--r--routes/lightning/conversionFee.js12
1 files changed, 12 insertions, 0 deletions
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);
+}