Skip to content

Commit

Permalink
feat(contracts): apply PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
seolaoh committed Oct 31, 2024
1 parent b9b201b commit 830511a
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions packages/contracts/contracts/L2/ValidatorRewardVault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -150,16 +150,11 @@ contract ValidatorRewardVault is FeeVault, ISemver {
*/
function withdrawToProtocolVault() external {
uint256 amount = address(this).balance - totalReserved;
require(
amount >= MIN_WITHDRAWAL_AMOUNT,
"ValidatorRewardVault: withdrawal amount must be greater than minimum withdrawal amount"
);
require(
amount > 0,
"ValidatorRewardVault: withdrawal amount must be greater than zero"
);
require(amount > 0, "ValidatorRewardVault: withdrawal amount must be greater than zero");

totalProcessed += amount;
unchecked {
totalProcessed += amount;
}

emit Withdrawal(amount, Predeploys.PROTOCOL_VAULT, msg.sender);

Expand Down

0 comments on commit 830511a

Please sign in to comment.