@bloks/utils
Advanced tools
Comparing version 3.5.93 to 3.5.94
{ | ||
"name": "@bloks/utils", | ||
"version": "3.5.93", | ||
"version": "3.5.94", | ||
"description": "", | ||
@@ -21,3 +21,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "0a632dd6a20aef390b20a279cda5b7a894d8c5ba" | ||
"gitHead": "e13817a8982fd9084a599735efc7a7d243b40178" | ||
} |
@@ -18,3 +18,3 @@ import { BigNumber } from 'bignumber.js' | ||
SAR: { symbol: 'SR', precision: 2 }, | ||
ETH: { symbol: 'Ξ', precision: 4 }, | ||
@@ -119,4 +119,4 @@ BTC: { symbol: '₿', precision: 8 }, | ||
*/ | ||
export function numberToAsset (number, symbol = constants.CORE_SYMBOL, precision = constants.CORE_PRECISION) { | ||
const amount = numbro(number).format({ thousandSeparated: false, mantissa: precision }) | ||
export function numberToAsset (number, symbol = constants.CORE_SYMBOL, precision = constants.CORE_PRECISION, trimMantissa = false) { | ||
const amount = numbro(number).format({ thousandSeparated: false, mantissa: precision, trimMantissa }) | ||
return `${amount} ${symbol}` | ||
@@ -123,0 +123,0 @@ } |
32377