Skip to content

Commit

Permalink
fix: fixed isolation mode condition
Browse files Browse the repository at this point in the history
  • Loading branch information
The-3D committed Oct 6, 2021
1 parent 2129dc0 commit 9672442
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contracts/protocol/libraries/logic/SupplyLogic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ library SupplyLogic {

if (isFirstSupply) {
(bool isolationModeActive, , ) = userConfig.getIsolationModeState(reserves, reservesList);
if (!isolationModeActive) {
if (
((!isolationModeActive && (reserveCache.ReserveConfiguration.getDebtCeiling() == 0)) ||
!reserveCache.configuration.isUsingAsCollateralAny())
) {
userConfig.setUsingAsCollateral(reserve.id, true);
emit ReserveUsedAsCollateralEnabled(params.asset, params.onBehalfOf);
}
Expand Down

0 comments on commit 9672442

Please sign in to comment.