@ethereansos/interfaces-core 0.4.78 → 0.4.79

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.esm.js CHANGED
@@ -34707,7 +34707,11 @@ function toDecimals(number, decimals) {
34707
34707
  decimals = Number(!isNaN((_decimals = decimals) === null || _decimals === void 0 ? void 0 : _decimals.value) ? decimals.value : decimals) || 18;
34708
34708
 
34709
34709
  if (!number) {
34710
- return '0';
34710
+ number = '0';
34711
+ }
34712
+
34713
+ if (!decimals || parseInt(decimals) === 0) {
34714
+ return number;
34711
34715
  }
34712
34716
 
34713
34717
  var symbol = toEthereumSymbol(decimals);
@@ -34957,6 +34961,14 @@ function fromDecimals(number, decimals, skipFormat) {
34957
34961
  number = Number(!isNaN((_number = number) === null || _number === void 0 ? void 0 : _number.value) ? number.value : number);
34958
34962
  decimals = Number(!isNaN((_decimals = decimals) === null || _decimals === void 0 ? void 0 : _decimals.value) ? decimals.value : decimals);
34959
34963
 
34964
+ if (!number) {
34965
+ number = '0';
34966
+ }
34967
+
34968
+ if (!decimals || parseInt(decimals) === 0) {
34969
+ return number;
34970
+ }
34971
+
34960
34972
  if (!number || !decimals) {
34961
34973
  return '0';
34962
34974
  }