Skip to content

Commit

Permalink
feat(metamorpho): add no pending value error
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubilmax committed Sep 20, 2023
1 parent c655c8c commit fea8da2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/MetaMorpho.sol
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ contract MetaMorpho is ERC4626, Ownable2Step, IMetaMorpho {
}

modifier timelockElapsed(uint64 submittedAt) {
require(submittedAt != 0, ErrorsLib.NO_PENDING_VALUE);
require(block.timestamp >= submittedAt + timelock, ErrorsLib.TIMELOCK_NOT_ELAPSED);
require(block.timestamp <= submittedAt + timelock + TIMELOCK_EXPIRATION, ErrorsLib.TIMELOCK_EXPIRATION_EXCEEDED);

Expand Down
2 changes: 2 additions & 0 deletions src/libraries/ErrorsLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ library ErrorsLib {

string internal constant MISSING_MARKET = "missing market";

string internal constant NO_PENDING_VALUE = "no pending value";

string internal constant WITHDRAW_FAILED_MORPHO = "withdraw failed on Morpho";

string internal constant MARKET_NOT_CREATED = "market not created";
Expand Down

0 comments on commit fea8da2

Please sign in to comment.