mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Fixes tests
This commit is contained in:
parent
b907b6b0b3
commit
758675c132
|
@ -238,12 +238,15 @@ contract LendingPoolCollateralManager is VersionedInitializable, LendingPoolStor
|
||||||
principalReserve.variableBorrowIndex
|
principalReserve.variableBorrowIndex
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
IVariableDebtToken(principalReserve.variableDebtTokenAddress).burn(
|
//if the user does not have variable debt, no need to try to burn variable
|
||||||
user,
|
//debt tokens
|
||||||
vars.userVariableDebt,
|
if (vars.userVariableDebt > 0) {
|
||||||
principalReserve.variableBorrowIndex
|
IVariableDebtToken(principalReserve.variableDebtTokenAddress).burn(
|
||||||
);
|
user,
|
||||||
|
vars.userVariableDebt,
|
||||||
|
principalReserve.variableBorrowIndex
|
||||||
|
);
|
||||||
|
}
|
||||||
IStableDebtToken(principalReserve.stableDebtTokenAddress).burn(
|
IStableDebtToken(principalReserve.stableDebtTokenAddress).burn(
|
||||||
user,
|
user,
|
||||||
vars.actualAmountToLiquidate.sub(vars.userVariableDebt)
|
vars.actualAmountToLiquidate.sub(vars.userVariableDebt)
|
||||||
|
@ -412,7 +415,11 @@ contract LendingPoolCollateralManager is VersionedInitializable, LendingPoolStor
|
||||||
vars.actualAmountToLiquidate,
|
vars.actualAmountToLiquidate,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
IERC20(principal).safeTransferFrom(receiver, vars.principalAToken, vars.actualAmountToLiquidate);
|
IERC20(principal).safeTransferFrom(
|
||||||
|
receiver,
|
||||||
|
vars.principalAToken,
|
||||||
|
vars.actualAmountToLiquidate
|
||||||
|
);
|
||||||
|
|
||||||
if (vars.userVariableDebt >= vars.actualAmountToLiquidate) {
|
if (vars.userVariableDebt >= vars.actualAmountToLiquidate) {
|
||||||
IVariableDebtToken(debtReserve.variableDebtTokenAddress).burn(
|
IVariableDebtToken(debtReserve.variableDebtTokenAddress).burn(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user