diff options
| author | Adrien Hopkins <[email protected]> | 2022-06-16 10:52:56 -0500 |
|---|---|---|
| committer | Adrien Hopkins <[email protected]> | 2022-06-16 10:52:56 -0500 |
| commit | 55d4763146916e7e168bdc0ffd6d97c0d82f8e83 (patch) | |
| tree | b2d81dd41421fd4678d94465b79388d3f9fb67e0 /routes/lightning/conversionFee.js | |
| parent | 8361c2d400145a13d9ba24299ceb7293e69d3d43 (diff) | |
| download | coinos-server-55d4763146916e7e168bdc0ffd6d97c0d82f8e83.tar.gz coinos-server-55d4763146916e7e168bdc0ffd6d97c0d82f8e83.zip | |
Added Lightning conversion fees (currently 0%)
Diffstat (limited to 'routes/lightning/conversionFee.js')
| -rw-r--r-- | routes/lightning/conversionFee.js | 12 |
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); +} |
