mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Fixed validation of isActive in validateWithdraw
This commit is contained in:
parent
3fc261037a
commit
673b8f22c4
|
@ -63,9 +63,15 @@ library ValidationLogic {
|
||||||
address oracle
|
address oracle
|
||||||
) external view {
|
) external view {
|
||||||
require(amount != 0, Errors.VL_INVALID_AMOUNT);
|
require(amount != 0, Errors.VL_INVALID_AMOUNT);
|
||||||
|
|
||||||
require(amount <= userBalance, Errors.VL_NOT_ENOUGH_AVAILABLE_USER_BALANCE);
|
require(amount <= userBalance, Errors.VL_NOT_ENOUGH_AVAILABLE_USER_BALANCE);
|
||||||
|
|
||||||
|
(bool isActive,, , ) = reservesData[reserveAddress].configuration.getFlags();
|
||||||
|
require(isActive, Errors.VL_NO_ACTIVE_RESERVE);
|
||||||
|
|
||||||
|
require(amount != 0, Errors.VL_INVALID_AMOUNT);
|
||||||
|
require(isActive, Errors.VL_NO_ACTIVE_RESERVE);
|
||||||
|
|
||||||
|
|
||||||
require(
|
require(
|
||||||
GenericLogic.balanceDecreaseAllowed(
|
GenericLogic.balanceDecreaseAllowed(
|
||||||
reserveAddress,
|
reserveAddress,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user