@gearbox-protocol/periphery-v3 1.3.10 → 1.3.11

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.twvUSD * PERCENTAGE_FACTOR / collateralDebtData.totalDebtUSD;
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 {
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/periphery-v3",
3
- "version": "1.3.10",
3
+ "version": "1.3.11",
4
4
  "main": "index.js",
5
5
  "repository": "git@github.com:Gearbox-protocol/periphery-v3.git",
6
6
  "author": "Mikael <26343374+0xmikko@users.noreply.github.com>",