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

Commit 090cbcd

Browse files
code formatting
1 parent 8549042 commit 090cbcd

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

contracts/compound/Comptroller.sol

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -575,13 +575,7 @@ contract Comptroller is ComptrollerBase, ComptrollerInterface, ComptrollerErrorR
575575
require(borrowBalance >= repayAmount, "!borrow>repay");
576576
} else {
577577
/* The borrower must have shortfall in order to be liquidateable */
578-
(Error err, , , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(
579-
borrower,
580-
ICErc20(address(0)),
581-
0,
582-
0,
583-
0
584-
);
578+
(Error err, , , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(borrower, ICErc20(address(0)), 0, 0, 0);
585579
if (err != Error.NO_ERROR) {
586580
return uint256(err);
587581
}
@@ -776,13 +770,7 @@ contract Comptroller is ComptrollerBase, ComptrollerInterface, ComptrollerErrorR
776770
uint256 collateralValue,
777771
uint256 liquidity,
778772
uint256 shortfall
779-
) = getHypotheticalAccountLiquidityInternal(
780-
account,
781-
ICErc20(cTokenModify),
782-
redeemTokens,
783-
borrowAmount,
784-
repayAmount
785-
);
773+
) = getHypotheticalAccountLiquidityInternal(account, ICErc20(cTokenModify), redeemTokens, borrowAmount, repayAmount);
786774
return (uint256(err), collateralValue, liquidity, shortfall);
787775
}
788776

@@ -859,8 +847,7 @@ contract Comptroller is ComptrollerBase, ComptrollerInterface, ComptrollerErrorR
859847

860848
// accumulate the collateral value to sumCollateral
861849
uint256 assetCollateralValue = mul_ScalarTruncate(vars.tokensToDenom, vars.cTokenBalance);
862-
if (assetCollateralValue > vars.assetAsCollateralValueCap)
863-
assetCollateralValue = vars.assetAsCollateralValueCap;
850+
if (assetCollateralValue > vars.assetAsCollateralValueCap) assetCollateralValue = vars.assetAsCollateralValueCap;
864851
vars.sumCollateral += assetCollateralValue;
865852
}
866853

0 commit comments

Comments
 (0)