mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Updated transferFrom in repayWithCollateral() and swapLiquidity()
This commit is contained in:
parent
d724d1f58f
commit
4e25657731
|
@ -404,7 +404,7 @@ contract LendingPoolCollateralManager is VersionedInitializable, LendingPoolStor
|
|||
vars.actualAmountToLiquidate,
|
||||
0
|
||||
);
|
||||
IERC20(principal).transferFrom(receiver, vars.principalAToken, vars.actualAmountToLiquidate);
|
||||
IERC20(principal).safeTransferFrom(receiver, vars.principalAToken, vars.actualAmountToLiquidate);
|
||||
|
||||
if (vars.userVariableDebt >= vars.actualAmountToLiquidate) {
|
||||
IVariableDebtToken(debtReserve.variableDebtTokenAddress).burn(
|
||||
|
@ -504,7 +504,7 @@ contract LendingPoolCollateralManager is VersionedInitializable, LendingPoolStor
|
|||
|
||||
vars.amountToReceive = IERC20(toAsset).balanceOf(receiverAddress);
|
||||
if (vars.amountToReceive != 0) {
|
||||
IERC20(toAsset).transferFrom(
|
||||
IERC20(toAsset).safeTransferFrom(
|
||||
receiverAddress,
|
||||
address(vars.toReserveAToken),
|
||||
vars.amountToReceive
|
||||
|
|
Loading…
Reference in New Issue
Block a user