@gearbox-protocol/periphery-v3 1.3.10 → 1.3.12
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.
|
@@ -263,7 +263,9 @@ contract DataCompressorV3_00 is IDataCompressorV3_00, ContractsRegisterTrait, Li
|
|
|
263
263
|
result.totalDebtUSD = collateralDebtData.totalDebtUSD;
|
|
264
264
|
result.totalValueUSD = collateralDebtData.totalValueUSD;
|
|
265
265
|
result.twvUSD = collateralDebtData.twvUSD;
|
|
266
|
-
result.healthFactor = collateralDebtData.
|
|
266
|
+
result.healthFactor = collateralDebtData.totalDebtUSD != 0
|
|
267
|
+
? collateralDebtData.twvUSD * PERCENTAGE_FACTOR / collateralDebtData.totalDebtUSD
|
|
268
|
+
: type(uint16).max;
|
|
267
269
|
result.totalValue = collateralDebtData.totalValue;
|
|
268
270
|
result.isSuccessful = true;
|
|
269
271
|
} catch {
|
|
@@ -13,8 +13,6 @@ contract LinearInterestModelHelper {
|
|
|
13
13
|
irm.interestModel = _model;
|
|
14
14
|
irm.version = LinearInterestRateModel(_model).version();
|
|
15
15
|
|
|
16
|
-
console.log(irm.version);
|
|
17
|
-
|
|
18
16
|
(irm.U_1, irm.U_2, irm.R_base, irm.R_slope1, irm.R_slope2, irm.R_slope3) =
|
|
19
17
|
LinearInterestRateModelV3(_model).getModelParameters();
|
|
20
18
|
|
|
@@ -137,4 +137,8 @@ contract DCTest {
|
|
|
137
137
|
cas = dc3.getCreditAccountsByBorrower(address(this), new PriceOnDemand[](0));
|
|
138
138
|
console.log("V3 credit accounts", cas.length);
|
|
139
139
|
}
|
|
140
|
+
|
|
141
|
+
// function test_dc_04_borrower() public liveTestOnly {
|
|
142
|
+
// dc3.getCreditAccountsByBorrower(0xffDb339065c91c88e8a3cC6857359B6c2FB78cf5, new PriceOnDemand[](0));
|
|
143
|
+
// }
|
|
140
144
|
}
|
package/package.json
CHANGED