Skip to content

Commit

Permalink
fix: small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmikko committed May 16, 2023
1 parent a3009d0 commit 577aef6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contracts/credit/CreditManagerV3.sol
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ contract CreditManagerV3 is ICreditManagerV3, SanityCheckTrait, ReentrancyGuardT
: liquidationDiscountExpired,
feeLiquidation: closureAction == ClosureAction.LIQUIDATE_ACCOUNT ? feeLiquidation : feeLiquidationExpired,
amountWithFeeFn: _amountWithFee,
amountMinusFeeFn: _amountWithFee
amountMinusFeeFn: _amountMinusFee
});
}
{
Expand Down
7 changes: 5 additions & 2 deletions contracts/libraries/CreditLogic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ library CreditLogic {
collateralTokensByMaskFn: collateralTokensByMaskFn,
convertToUSDFn: convertToUSDFn
});

totalValueUSD += tvDelta;
twvUSD += twvDelta;
}
}

Expand All @@ -367,13 +370,13 @@ library CreditLogic {
address token = collateralDebtData.quotedTokens[i];
if (token == address(0)) break;
{
uint16 lt = collateralDebtData.quotedLts[i];
uint16 liquidationThreshold = collateralDebtData.quotedLts[i];
uint256 quotaUSD = collateralDebtData.quotas[i] * underlyingPriceRAY / RAY;
(uint256 valueUSD, uint256 weightedValueUSD,) = calcOneTokenCollateral({
priceOracle: priceOracle,
creditAccount: creditAccount,
token: token,
liquidationThreshold: lt,
liquidationThreshold: liquidationThreshold,
quotaUSD: quotaUSD,
convertToUSDFn: convertToUSDFn
});
Expand Down

0 comments on commit 577aef6

Please sign in to comment.