@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.
@@ -21,7 +21,7 @@ export type Chains = "btc-mainnet" | "eth-mainnet" | "matic-mainnet" | "bsc-main
21
21
  * CovalentClient Class
22
22
  */
23
23
  export type Quotes = "USD" | "CAD" | "EUR" | "SGD" | "INR" | "JPY" | "VND" | "CNY" | "KRW" | "RUB" | "TRY" | "NGN" | "ARS" | "AUD" | "CHF" | "GBP";
24
- export declare const userAgent = "com.covalenthq.sdk.typescript/0.6.3";
24
+ export declare const userAgent = "com.covalenthq.sdk.typescript/0.6.4";
25
25
  export declare class Response<T> {
26
26
  data: T;
27
27
  error: boolean;
package/dist/esm/index.js CHANGED
@@ -6246,7 +6246,7 @@ class XykService {
6246
6246
  }
6247
6247
  }
6248
6248
 
6249
- const userAgent = "com.covalenthq.sdk.typescript/0.6.3";
6249
+ const userAgent = "com.covalenthq.sdk.typescript/0.6.4";
6250
6250
  /**
6251
6251
  * CovalentClient Class
6252
6252
  */
@@ -6282,8 +6282,15 @@ class Client {
6282
6282
  }
6283
6283
 
6284
6284
  const calculatePrettyBalance = (value, decimals = 18, roundOff = true, precision = 0) => {
6285
- const bigIntValue = BigInt(value);
6286
- const bigDecimalValue = new Big(bigIntValue.toString());
6285
+ let bigIntValue;
6286
+ let bigDecimalValue;
6287
+ try {
6288
+ bigIntValue = BigInt(value);
6289
+ bigDecimalValue = new Big(bigIntValue.toString());
6290
+ }
6291
+ catch (error) {
6292
+ bigDecimalValue = new Big(value.toString());
6293
+ }
6287
6294
  const _decimals = decimals || 18;
6288
6295
  const _expoValue = BigInt(Math.pow(10, _decimals));
6289
6296
  const bigDecimalExpo = new Big(_expoValue.toString());