feat: added new Errors.VL_SAME_BLOCK_BORROW

This commit is contained in:
Hadrien Charlanes 2021-06-21 12:58:20 +02:00
parent 09233d09bf
commit a0a185fbf6
2 changed files with 5 additions and 1 deletions

View File

@ -113,6 +113,7 @@ library Errors {
string public constant RL_STABLE_DEBT_NOT_ZERO = '89';
string public constant RL_VARIABLE_DEBT_SUPPLY_NOT_ZERO = '90';
string public constant LP_CALLER_NOT_EOA = '91';
string public constant VL_SAME_BLOCK_BORROW = '94';
enum CollateralManagerErrors {
NO_ERROR,

View File

@ -270,7 +270,10 @@ library ValidationLogic {
require(amountSent > 0, Errors.VL_INVALID_AMOUNT);
require(lastBorrower != onBehalfOf || lastBorrowTimestamp != uint40(block.timestamp));
require(
lastBorrower != onBehalfOf || lastBorrowTimestamp != uint40(block.timestamp),
Errors.VL_SAME_BLOCK_BORROW
);
require(
(stableDebt > 0 &&