@gearbox-protocol/sdk 1.20.12 → 1.20.14
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.
|
@@ -82,7 +82,7 @@ export declare class ChartsCreditManagerData {
|
|
|
82
82
|
readonly totalOpenedAccountsChange: number;
|
|
83
83
|
readonly totalClosedAccountsChange: number;
|
|
84
84
|
readonly totalLiquidatedAccountsChange: number;
|
|
85
|
-
readonly liquidationThresholds: Record<string,
|
|
85
|
+
readonly liquidationThresholds: Record<string, BigNumber>;
|
|
86
86
|
constructor(payload: ChartsCreditManagerPayload);
|
|
87
87
|
}
|
|
88
88
|
export interface CalcHealthFactorProps {
|
|
@@ -160,14 +160,20 @@ var ChartsCreditManagerData = /** @class */ (function () {
|
|
|
160
160
|
this.borrowRateChange =
|
|
161
161
|
(payload.borrowRate10kBasis || 0) * constants_1.PERCENTAGE_DECIMALS;
|
|
162
162
|
this.maxLeverageFactor = ethers_1.BigNumber.from(payload.maxLeverageFactor || 0).toNumber();
|
|
163
|
-
this.feeInterest = payload.feeInterest;
|
|
164
|
-
this.feeLiquidation = payload.feeLiquidation;
|
|
165
|
-
this.feeLiquidationExpired = payload.feeLiquidationExpired;
|
|
163
|
+
this.feeInterest = payload.feeInterest || 0;
|
|
164
|
+
this.feeLiquidation = payload.feeLiquidation || 0;
|
|
165
|
+
this.feeLiquidationExpired = payload.feeLiquidationExpired || 0;
|
|
166
166
|
this.minAmount = ethers_1.BigNumber.from(payload.minAmount || 0);
|
|
167
167
|
this.maxAmount = ethers_1.BigNumber.from(payload.maxAmount || 0);
|
|
168
168
|
this.availableLiquidity = ethers_1.BigNumber.from(payload.availableLiquidity || 0);
|
|
169
169
|
this.availableLiquidityInUSD = payload.availableLiquidityInUSD || 0;
|
|
170
|
-
this.liquidationThresholds = payload.liquidityThresholds
|
|
170
|
+
this.liquidationThresholds = Object.fromEntries(Object.entries(payload.liquidityThresholds || {}).map(function (_a) {
|
|
171
|
+
var t = _a[0], tr = _a[1];
|
|
172
|
+
return [
|
|
173
|
+
t.toLowerCase(),
|
|
174
|
+
ethers_1.BigNumber.from(tr),
|
|
175
|
+
];
|
|
176
|
+
}));
|
|
171
177
|
this.totalBorrowed = ethers_1.BigNumber.from(payload.totalBorrowed || 0);
|
|
172
178
|
this.totalBorrowedOld = ethers_1.BigNumber.from(payload.totalBorrowedBIOld || 0);
|
|
173
179
|
this.totalBorrowedInUSD = payload.totalBorrowedInUSD || 0;
|