@covalenthq/client-sdk 0.6.3 → 0.6.4

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
@@ -6248,7 +6248,7 @@ class XykService {
6248
6248
  }
6249
6249
  }
6250
6250
 
6251
- const userAgent = "com.covalenthq.sdk.typescript/0.6.3";
6251
+ const userAgent = "com.covalenthq.sdk.typescript/0.6.4";
6252
6252
  /**
6253
6253
  * CovalentClient Class
6254
6254
  */
@@ -6284,8 +6284,15 @@ class Client {
6284
6284
  }
6285
6285
 
6286
6286
  const calculatePrettyBalance = (value, decimals = 18, roundOff = true, precision = 0) => {
6287
- const bigIntValue = BigInt(value);
6288
- const bigDecimalValue = new Big(bigIntValue.toString());
6287
+ let bigIntValue;
6288
+ let bigDecimalValue;
6289
+ try {
6290
+ bigIntValue = BigInt(value);
6291
+ bigDecimalValue = new Big(bigIntValue.toString());
6292
+ }
6293
+ catch (error) {
6294
+ bigDecimalValue = new Big(value.toString());
6295
+ }
6289
6296
  const _decimals = decimals || 18;
6290
6297
  const _expoValue = BigInt(Math.pow(10, _decimals));
6291
6298
  const bigDecimalExpo = new Big(_expoValue.toString());