mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
feat: added new Errors.VL_SAME_BLOCK_BORROW
This commit is contained in:
parent
09233d09bf
commit
a0a185fbf6
|
@ -113,6 +113,7 @@ library Errors {
|
||||||
string public constant RL_STABLE_DEBT_NOT_ZERO = '89';
|
string public constant RL_STABLE_DEBT_NOT_ZERO = '89';
|
||||||
string public constant RL_VARIABLE_DEBT_SUPPLY_NOT_ZERO = '90';
|
string public constant RL_VARIABLE_DEBT_SUPPLY_NOT_ZERO = '90';
|
||||||
string public constant LP_CALLER_NOT_EOA = '91';
|
string public constant LP_CALLER_NOT_EOA = '91';
|
||||||
|
string public constant VL_SAME_BLOCK_BORROW = '94';
|
||||||
|
|
||||||
enum CollateralManagerErrors {
|
enum CollateralManagerErrors {
|
||||||
NO_ERROR,
|
NO_ERROR,
|
||||||
|
|
|
@ -270,7 +270,10 @@ library ValidationLogic {
|
||||||
|
|
||||||
require(amountSent > 0, Errors.VL_INVALID_AMOUNT);
|
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(
|
require(
|
||||||
(stableDebt > 0 &&
|
(stableDebt > 0 &&
|
||||||
|
|
Loading…
Reference in New Issue
Block a user