aboutsummaryrefslogtreecommitdiffstats
path: root/routes/bitcoin/conversionFee.js
blob: 7e3056592dc1072672e45a34b45edc856b7201e8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
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.001;
export const conversionFeeReceiver = "coinosfees";  // account that receives the fees

/**
 * Returns the fee you have to pay for withdrawing 'amount' bitcoin.
 */
export function computeConversionFee(amount) {
  return Math.floor(amount * conversionFeeMultiplier);
}