@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 +10 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/services/CovalentClient.d.ts +1 -1
- package/dist/es/index.js +10 -3
- package/dist/es/index.js.map +1 -1
- package/dist/es/services/CovalentClient.d.ts +1 -1
- package/dist/esm/index.js +10 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/services/CovalentClient.d.ts +1 -1
- package/dist/services/CovalentClient.d.ts +1 -1
- package/dist/services/CovalentClient.js +1 -1
- package/dist/util/CalculatePrettyBalance.js +9 -2
- package/dist/util/CalculatePrettyBalance.js.map +1 -1
- package/package.json +1 -1
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.
|
|
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
|
-
|
|
6288
|
-
|
|
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());
|