@covalenthq/client-sdk 0.9.6 → 0.9.8

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/cjs/index.js CHANGED
@@ -7796,7 +7796,7 @@ class XykService {
7796
7796
  }
7797
7797
  }
7798
7798
 
7799
- const userAgent = "com.covalenthq.sdk.typescript/0.9.6";
7799
+ const userAgent = "com.covalenthq.sdk.typescript/0.9.8";
7800
7800
  class Response {
7801
7801
  }
7802
7802
  /**
@@ -7847,10 +7847,13 @@ const calculatePrettyBalance = (value, decimals = 18, roundOff = true, precision
7847
7847
  catch (error) {
7848
7848
  bigDecimalValue = new Big(value.toString());
7849
7849
  }
7850
- const _decimals = decimals || 18;
7850
+ const _decimals = decimals ?? 18;
7851
7851
  const _expoValue = BigInt(Math.pow(10, _decimals));
7852
7852
  const bigDecimalExpo = new Big(_expoValue.toString());
7853
7853
  const _calculated = bigDecimalValue.div(bigDecimalExpo);
7854
+ if (decimals === 0) {
7855
+ return _calculated.toString();
7856
+ }
7854
7857
  // removes the decimal places, true by default so it adds decimals
7855
7858
  if (!roundOff) {
7856
7859
  return _calculated.toString();