@ethereansos/interfaces-core 0.4.101 → 0.4.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +3 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -50355,14 +50355,15 @@ function fromDecimals(number, decimals, skipFormat) {
|
|
|
50355
50355
|
return '0';
|
|
50356
50356
|
}
|
|
50357
50357
|
|
|
50358
|
+
number = numberToString(number).split('.')[0];
|
|
50358
50359
|
var symbol = toEthereumSymbol(decimals);
|
|
50359
50360
|
|
|
50360
50361
|
if (symbol) {
|
|
50361
|
-
var result = web3Utils.fromWei(
|
|
50362
|
+
var result = web3Utils.fromWei(number, symbol);
|
|
50362
50363
|
return skipFormat === true ? result : formatMoney(result);
|
|
50363
50364
|
}
|
|
50364
50365
|
|
|
50365
|
-
var nts = parseFloat(numberToString(number / (decimals < 2 ? 1 : Math.pow(10, decimals)))); // TODO verify if is expected that is rounded to 2 decimals
|
|
50366
|
+
var nts = parseFloat(numberToString(parseFloat(number) / (decimals < 2 ? 1 : Math.pow(10, decimals)))); // TODO verify if is expected that is rounded to 2 decimals
|
|
50366
50367
|
|
|
50367
50368
|
return skipFormat === true ? numberToString(nts) : formatMoney(nts);
|
|
50368
50369
|
}
|