From 9a931a40366a283c85474575227fd6053b2bd0bc Mon Sep 17 00:00:00 2001 From: Samyak Jain <34437877+KaymasJain@users.noreply.github.com> Date: Sat, 23 May 2020 22:08:22 +1000 Subject: [PATCH] removed unnecessary require statements --- contracts/connectors/aave.sol | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/contracts/connectors/aave.sol b/contracts/connectors/aave.sol index 1b305f8..2c2c8ae 100644 --- a/contracts/connectors/aave.sol +++ b/contracts/connectors/aave.sol @@ -182,11 +182,8 @@ contract BasicResolver is AaveHelpers { uint ethAmt; if (token == getEthAddr()) { ethAmt = _amt; - require(address(this).balance >= _amt, "not-enough-eth"); } else { - TokenInterface tokenContract = TokenInterface(token); - require(tokenContract.balanceOf(address(this)) >= _amt, "not-enough-token"); - tokenContract.approve(getAaveCoreAddress(), _amt); + TokenInterface(token).approve(getAaveCoreAddress(), _amt); } aave.repay.value(ethAmt)(token, _amt, payable(address(this)));