@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 +5 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/services/BaseService.d.ts +1 -1
- package/dist/cjs/services/CovalentClient.d.ts +1 -1
- package/dist/cjs/util/types/BaseServiceTypes.d.ts +1 -1
- package/dist/es/index.js +5 -2
- package/dist/es/index.js.map +1 -1
- package/dist/es/services/BaseService.d.ts +1 -1
- package/dist/es/services/CovalentClient.d.ts +1 -1
- package/dist/es/util/types/BaseServiceTypes.d.ts +1 -1
- package/dist/esm/index.js +5 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/services/BaseService.d.ts +1 -1
- package/dist/esm/services/CovalentClient.d.ts +1 -1
- package/dist/esm/util/types/BaseServiceTypes.d.ts +1 -1
- package/dist/services/BaseService.d.ts +1 -1
- package/dist/services/CovalentClient.d.ts +1 -1
- package/dist/services/CovalentClient.js +1 -1
- package/dist/util/CalculatePrettyBalance.js +4 -1
- package/dist/util/CalculatePrettyBalance.js.map +1 -1
- package/dist/util/types/BaseServiceTypes.d.ts +1 -1
- package/package.json +1 -1
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.
|
|
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
|
|
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();
|