From 7d9b16ead97692c94f346af0f2f4e16d16c94ef8 Mon Sep 17 00:00:00 2001 From: Ana Julia Date: Mon, 8 Jul 2024 09:09:16 -0300 Subject: [PATCH] non owners --- test/Staking.t.sol | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test/Staking.t.sol b/test/Staking.t.sol index ce70533..6b81f39 100644 --- a/test/Staking.t.sol +++ b/test/Staking.t.sol @@ -1461,14 +1461,10 @@ contract OwnableFunctions is StakingTest { "Wrong balance" ); - // get keyper stake ids - uint256[] memory keyperStakeIds = staking.getKeyperStakeIds(_keyper); assertEq(keyperStakeIds.length, 0, "Wrong stake ids"); } - // TEST CASES FOR NON OWNERS - function testFuzz_RevertIf_NonOwnerSetRewardsDistributor( address _newRewardsDistributor, address _nonOwner @@ -1481,7 +1477,8 @@ contract OwnableFunctions is StakingTest { vm.assume( _nonOwner != address(0) && - _nonOwner != ProxyUtils.getAdminAddress(address(staking)) + _nonOwner != ProxyUtils.getAdminAddress(address(staking)) && + _nonOwner != address(this) ); vm.prank(_nonOwner); @@ -1500,7 +1497,8 @@ contract OwnableFunctions is StakingTest { ) public { vm.assume( _nonOwner != address(0) && - _nonOwner != ProxyUtils.getAdminAddress(address(staking)) + _nonOwner != ProxyUtils.getAdminAddress(address(staking)) && + _nonOwner != address(this) ); vm.prank(_nonOwner); @@ -1519,7 +1517,8 @@ contract OwnableFunctions is StakingTest { ) public { vm.assume( _nonOwner != address(0) && - _nonOwner != ProxyUtils.getAdminAddress(address(staking)) + _nonOwner != ProxyUtils.getAdminAddress(address(staking)) && + _nonOwner != address(this) ); vm.prank(_nonOwner);