mirror of
https://github.com/Instadapp/dsa-connectors-old.git
synced 2024-07-29 22:47:46 +00:00
removed unnecessary require statements
This commit is contained in:
parent
09a6932acc
commit
9a931a4036
|
@ -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)));
|
||||
|
|
Loading…
Reference in New Issue
Block a user