Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const config = {
- coinDecimalPlaces: 6,
- coinDifficultyTarget: 120,
- coinUnits: 100000000,
- symbol: 'BCN'
- };
- function getCoinDecimalPlaces() {
- if (typeof coinDecimalPlaces != "undefined") return coinDecimalPlaces;
- else if (config.coinDecimalPlaces) return config.coinDecimalPlaces;
- else lastStats.config.coinUnits.toString().length - 1;
- }
- function getReadableCoins(coins, digits, withoutSymbol){
- var coinDecimalPlaces = getCoinDecimalPlaces();
- var amount = parseFloat((parseInt(coins || 0) / config.coinUnits).toFixed(digits || coinDecimalPlaces));
- return amount.toString() + (withoutSymbol ? '' : (' ' + config.symbol));
- }
Add Comment
Please, Sign In to add comment