Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Commit 3786912

Browse files
authored
chore: new version (#647)
* chore: new version * chore: deploy * chore: deploy test
1 parent d4c9396 commit 3786912

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
<h1 align="center">Aave Utilities</h1>
44

5-
> [!CAUTION]
6-
> This repository is deprecated. Refer to [aave-sdk](https://github.com/aave/aave-sdk) and [Aave Docs](https://aave.com/docs/aave-v3/getting-started) for latest integration endpoints.
5+
> [!CAUTION] This repository is deprecated. Refer to
6+
> [aave-sdk](https://github.com/aave/aave-sdk) and
7+
> [Aave Docs](https://aave.com/docs/aave-v3/getting-started) for latest
8+
> integration endpoints.
79
810
The Aave Protocol is a decentralized non-custodial liquidity protocol where
911
users can participate as suppliers or borrowers.
@@ -1700,7 +1702,7 @@ const governanceService = new AaveGovernanceService(rpcProvider, {
17001702
17011703
/*
17021704
- @param `user` The ethereum address that will create the proposal
1703-
- @param `proposalId` Id of the proposal we want to execute
1705+
- @param `proposalId` Id of the proposal we want to execute it
17041706
*/
17051707
const tx = governanceService.execute({ user, proposalId });
17061708
```

packages/contract-helpers/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ querying aggregated on-chain data via rpc.
55

66
## Installation
77

8-
Install the package in your project directory with:
8+
Install the package in your project directory with
99

1010
```sh
1111
// with npm

packages/math-utils/src/formatters/user/calculate-user-reserve-totals.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,20 @@ export function calculateUserReserveTotals({
4040
userReserveSummary.variableBorrowsMarketReferenceCurrency,
4141
);
4242

43-
if (
43+
// Check if asset has liquidation threshold in user's e-mode category
44+
const selectedEModeCategory =
45+
userReserveSummary.userReserve.reserve.eModes.find(
46+
elem => elem.id === userEmodeCategoryId,
47+
);
48+
const hasLiquidationThreshold =
4449
userReserveSummary.userReserve.reserve.reserveLiquidationThreshold !==
45-
'0' &&
50+
'0' ||
51+
(userEmodeCategoryId &&
52+
selectedEModeCategory &&
53+
selectedEModeCategory.collateralEnabled);
54+
55+
if (
56+
hasLiquidationThreshold &&
4657
userReserveSummary.userReserve.usageAsCollateralEnabledOnUser
4758
) {
4859
if (userReserveSummary.userReserve.reserve.debtCeiling !== '0') {
@@ -54,10 +65,6 @@ export function calculateUserReserveTotals({
5465
totalCollateralMarketReferenceCurrency.plus(
5566
userReserveSummary.underlyingBalanceMarketReferenceCurrency,
5667
);
57-
const selectedEModeCategory =
58-
userReserveSummary.userReserve.reserve.eModes.find(
59-
elem => elem.id === userEmodeCategoryId,
60-
);
6168
if (
6269
userEmodeCategoryId &&
6370
selectedEModeCategory &&

0 commit comments

Comments
 (0)