Fix aave v2 payback

This commit is contained in:
Mubaris NK 2021-01-09 16:36:57 +05:30
parent d78bc8f8be
commit 70e3bc6348
No known key found for this signature in database
GPG Key ID: 1F132294E8700320

View File

@ -926,7 +926,9 @@ contract AaveV2Helpers is AaveV1Helpers {
_amt = amt == uint(-1) ? getPaybackBalanceV2(aaveData, _token, rateMode) : amt;
convertEthToWeth(isEth, tokenContract, amt);
convertEthToWeth(isEth, tokenContract, _amt);
tokenContract.approve(address(aave), _amt);
aave.repay(_token, _amt, rateMode, address(this));
}