Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkeating committed Mar 19, 2024
1 parent 794d55d commit 6a6fc7e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/UniStaker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,8 @@ contract UniStaker is INotifiableRewardReceiver, Multicall, EIP712, Nonces {
emit RewardNotified(_amount, msg.sender);
}

/// @notice Allows an address to increment their nonce and therefore invalidate any pending signed actions.
/// @notice Allows an address to increment their nonce and therefore invalidate any pending signed
/// actions.
function invalidateNonce() external {
_useNonce(msg.sender);
}
Expand Down
13 changes: 9 additions & 4 deletions test/UniStaker.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2647,7 +2647,11 @@ contract InvalidateNonce is UniStakerTest {
assertEq(currentNonce, _initialNonce + 1, "Current nonce is incorrect");
}

function testFuzz_NonOwnerCannotUpdateAnotherAddressesNonce(address _caller, address _nonceOwner, uint256 _initialNonce) public {
function testFuzz_NonOwnerCannotUpdateAnotherAddressesNonce(
address _caller,
address _nonceOwner,
uint256 _initialNonce
) public {
vm.assume(_caller != address(0));
vm.assume(_initialNonce != type(uint256).max);

Expand All @@ -2661,10 +2665,12 @@ contract InvalidateNonce is UniStakerTest {

uint256 currentNonce = uniStaker.nonces(_nonceOwner);

assertEq(currentNonce, _initialNonce);
assertEq(currentNonce, _initialNonce);
}

function testFuzz_NonceIncrementsWhenCalledMultipleTimes(address _caller, uint256, _initialNonce) public {
function testFuzz_NonceIncrementsWhenCalledMultipleTimes(address _caller, uint256 _initialNonce)
public
{
vm.assume(_caller != address(0));
vm.assume(_initialNonce != type(uint256).max);

Expand All @@ -2682,7 +2688,6 @@ contract InvalidateNonce is UniStakerTest {
uint256 currentNonce = uniStaker.nonces(_caller);

assertEq(currentNonce, _initialNonce + 2, "Current nonce is incorrect");

}
}

Expand Down

0 comments on commit 6a6fc7e

Please sign in to comment.