@gearbox-protocol/periphery-v3 1.3.9 → 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 {
@@ -287,7 +289,6 @@ contract DataCompressorV3_00 is IDataCompressorV3_00, ContractsRegisterTrait, Li
287
289
  CreditManagerV3(_cm).creditAccountInfo(_creditAccount);
288
290
 
289
291
  result.expirationDate = creditFacade.expirationDate();
290
- result.maxApprovedBots = CreditFacadeV3(address(creditFacade)).maxApprovedBots();
291
292
 
292
293
  result.activeBots = IBotListV3(CreditFacadeV3(address(creditFacade)).botList()).activeBots(_cm, _creditAccount);
293
294
  }
@@ -67,7 +67,6 @@ struct CreditAccountData {
67
67
  // V3 features
68
68
  uint40 expirationDate;
69
69
  address[] activeBots;
70
- uint256 maxApprovedBots;
71
70
  }
72
71
 
73
72
  struct LinearModel {
@@ -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.9",
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>",
@@ -18,7 +18,7 @@
18
18
  "@commitlint/cli": "^17.6.3",
19
19
  "@commitlint/config-conventional": "17.6.0",
20
20
  "@gearbox-protocol/core-v2": "1.19.0-base.16",
21
- "@gearbox-protocol/core-v3": "^1.44.0",
21
+ "@gearbox-protocol/core-v3": "^1.45.3",
22
22
  "@gearbox-protocol/integrations-v3": "^1.23.1",
23
23
  "@gearbox-protocol/oracles-v3": "^1.8.1",
24
24
  "@gearbox-protocol/sdk-gov": "^1.14.0",