@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.cjs.js CHANGED
@@ -34718,7 +34718,11 @@ function toDecimals(number, decimals) {
34718
34718
  decimals = Number(!isNaN((_decimals = decimals) === null || _decimals === void 0 ? void 0 : _decimals.value) ? decimals.value : decimals) || 18;
34719
34719
 
34720
34720
  if (!number) {
34721
- return '0';
34721
+ number = '0';
34722
+ }
34723
+
34724
+ if (!decimals || parseInt(decimals) === 0) {
34725
+ return number;
34722
34726
  }
34723
34727
 
34724
34728
  var symbol = toEthereumSymbol(decimals);
@@ -34968,6 +34972,14 @@ function fromDecimals(number, decimals, skipFormat) {
34968
34972
  number = Number(!isNaN((_number = number) === null || _number === void 0 ? void 0 : _number.value) ? number.value : number);
34969
34973
  decimals = Number(!isNaN((_decimals = decimals) === null || _decimals === void 0 ? void 0 : _decimals.value) ? decimals.value : decimals);
34970
34974
 
34975
+ if (!number) {
34976
+ number = '0';
34977
+ }
34978
+
34979
+ if (!decimals || parseInt(decimals) === 0) {
34980
+ return number;
34981
+ }
34982
+
34971
34983
  if (!number || !decimals) {
34972
34984
  return '0';
34973
34985
  }