refactor isETH condition

This commit is contained in:
Thrilok kumar 2022-10-15 22:29:15 +05:30 committed by GitHub
parent c27367aea3
commit 8d8969960c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -161,11 +161,9 @@ abstract contract MorphoAaveV2 is Helpers, Events {
{
uint256 _amt = getUint(_getId, _amount);
bool _isETH = _tokenAddress == ethAddr;
MORPHO_AAVE.borrow(_poolTokenAddress, _amt);
if (_isETH) convertWethToEth(_isETH, TokenInterface(wethAddr), _amt);
convertWethToEth(_tokenAddress == ethAddr, TokenInterface(wethAddr), _amt);
setUint(_setId, _amt);