Skip to content

Commit

Permalink
feat: fixed collateral enabled check on total calcs
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaquinBattilana committed Oct 26, 2024
1 parent a46aa13 commit e6da546
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ export function calculateUserReserveTotals({
userReserveSummary.userReserve.reserve.eModes.find(
elem => elem.id === userEmodeCategoryId,
);
if (userEmodeCategoryId && selectedEModeCategory) {
if (
userEmodeCategoryId &&
selectedEModeCategory &&
selectedEModeCategory.collateralEnabled
) {
currentLtv = currentLtv.plus(
valueToBigNumber(
userReserveSummary.underlyingBalanceMarketReferenceCurrency,
Expand Down

0 comments on commit e6da546

Please sign in to comment.