@@ -575,13 +575,7 @@ contract Comptroller is ComptrollerBase, ComptrollerInterface, ComptrollerErrorR
575
575
require (borrowBalance >= repayAmount, "!borrow>repay " );
576
576
} else {
577
577
/* 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 );
585
579
if (err != Error.NO_ERROR) {
586
580
return uint256 (err);
587
581
}
@@ -776,13 +770,7 @@ contract Comptroller is ComptrollerBase, ComptrollerInterface, ComptrollerErrorR
776
770
uint256 collateralValue ,
777
771
uint256 liquidity ,
778
772
uint256 shortfall
779
- ) = getHypotheticalAccountLiquidityInternal (
780
- account,
781
- ICErc20 (cTokenModify),
782
- redeemTokens,
783
- borrowAmount,
784
- repayAmount
785
- );
773
+ ) = getHypotheticalAccountLiquidityInternal (account, ICErc20 (cTokenModify), redeemTokens, borrowAmount, repayAmount);
786
774
return (uint256 (err), collateralValue, liquidity, shortfall);
787
775
}
788
776
@@ -859,8 +847,7 @@ contract Comptroller is ComptrollerBase, ComptrollerInterface, ComptrollerErrorR
859
847
860
848
// accumulate the collateral value to sumCollateral
861
849
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;
864
851
vars.sumCollateral += assetCollateralValue;
865
852
}
866
853
0 commit comments