Skip to content

Commit

Permalink
Remove 'if' checks in 'setDelay' for testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
RCantu92 committed May 21, 2024
1 parent 42a238e commit 4bf00e4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions contracts/components/staking/GeneralFortaStakingVault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ contract GeneralFortaStakingVault is ERC4626Upgradeable, AccessControlUpgradeabl
// treasury for slashing
address private _treasury;
uint64 private _withdrawalDelay;
// depositor => time of deposit
// depositor => deposit timestamp
mapping(address => uint256) private _depositTimes;

event Slashed(address indexed by, uint256 indexed value);
Expand Down Expand Up @@ -90,8 +90,9 @@ contract GeneralFortaStakingVault is ERC4626Upgradeable, AccessControlUpgradeabl
* @param newDelay in seconds.
*/
function setDelay(uint64 newDelay) external onlyRole(DEFAULT_ADMIN_ROLE) {
if (newDelay < MIN_WITHDRAWAL_DELAY) revert AmountTooSmall(newDelay, MIN_WITHDRAWAL_DELAY);
if (newDelay > MAX_WITHDRAWAL_DELAY) revert AmountTooLarge(newDelay, MAX_WITHDRAWAL_DELAY);
// TODO: Uncomment for PROD
// if (newDelay < MIN_WITHDRAWAL_DELAY) revert AmountTooSmall(newDelay, MIN_WITHDRAWAL_DELAY);
// if (newDelay > MAX_WITHDRAWAL_DELAY) revert AmountTooLarge(newDelay, MAX_WITHDRAWAL_DELAY);
_withdrawalDelay = newDelay;
emit DelaySet(newDelay);
}
Expand Down

0 comments on commit 4bf00e4

Please sign in to comment.