Skip to content

Commit

Permalink
Validated the user balance before isActive
Browse files Browse the repository at this point in the history
  • Loading branch information
The-3D committed Nov 10, 2020
1 parent 31cbe91 commit 57ed9ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contracts/libraries/logic/ValidationLogic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ library ValidationLogic {
address oracle
) external view {

(bool isActive,, , ) = reservesData[reserveAddress].configuration.getFlags();
require(isActive, Errors.VL_NO_ACTIVE_RESERVE);

require(amount != 0, Errors.VL_INVALID_AMOUNT);
require(amount <= userBalance, Errors.VL_NOT_ENOUGH_AVAILABLE_USER_BALANCE);

(bool isActive,, , ) = reservesData[reserveAddress].configuration.getFlags();
require(isActive, Errors.VL_NO_ACTIVE_RESERVE);

require(
GenericLogic.balanceDecreaseAllowed(
reserveAddress,
Expand Down

0 comments on commit 57ed9ef

Please sign in to comment.