Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffywu committed Aug 13, 2024
1 parent 1fbc49d commit 59895fb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions contracts/vaults/staking/protocols/Kelp.sol
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ contract KelpCooldownHolder is ClonedCoolDownHolder {
}

function _finalizeCooldown() internal override returns (uint256 tokensClaimed, bool finalized) {
(/* */, /* */, /* */, uint256 userWithdrawalRequestNonce) = WithdrawManager.getUserWithdrawalRequest(Deployments.ALT_ETH_ADDRESS, address(this), 0);
(/* */, /* */, uint256 userWithdrawalStartBlock, uint256 userWithdrawalRequestNonce) = WithdrawManager.getUserWithdrawalRequest(Deployments.ALT_ETH_ADDRESS, address(this), 0);
uint256 nextNonce = WithdrawManager.nextLockedNonce(Deployments.ALT_ETH_ADDRESS);
// Will revert when nextLockedNonce == userWithdrawalRequestNonce, so this must be strictly less than
if (nextNonce < userWithdrawalRequestNonce) {
// These two requirements are checked in the WithdrawManager.
if (
nextNonce < userWithdrawalRequestNonce ||
block.number < userWithdrawalStartBlock + WithdrawManager.withdrawalDelayBlocks()
) {
return (0, false);
}

Expand Down

0 comments on commit 59895fb

Please sign in to comment.