Skip to content

Commit

Permalink
nit on test 2
Browse files Browse the repository at this point in the history
  • Loading branch information
--systemdf authored and --systemdf committed Mar 27, 2024
1 parent b6bd2be commit 38c81f5
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions per_multicall/test/ExpressRelayUnit.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -87,25 +87,22 @@ contract ExpressRelayUnitTest is Test, ExpressRelayTestSetup {
}

function testRemoveRelayerSubwalletByNonRelayerPrimaryFail() public {
address subwallet = makeAddr("subwallet");
address subwallet1 = makeAddr("subwallet1");
address subwallet2 = makeAddr("subwallet2");
vm.prank(relayer);
expressRelay.addRelayerSubwallet(subwallet);
address[] memory relayerSubwalletsPre = expressRelay
.getRelayerSubwallets();
expressRelay.addRelayerSubwallet(subwallet1);
vm.prank(relayer);
expressRelay.addRelayerSubwallet(subwallet2);

vm.expectRevert(Unauthorized.selector);
vm.prank(admin);
expressRelay.removeRelayerSubwallet(subwallet);
address[] memory relayerSubwalletsPost = expressRelay
.getRelayerSubwallets();
vm.prank(subwallet1);
expressRelay.removeRelayerSubwallet(subwallet2);
}

function testRemoveNonExistentRelayerSubwalletByRelayerFail() public {
address subwallet = makeAddr("subwallet");
vm.prank(relayer);
expressRelay.addRelayerSubwallet(subwallet);
address[] memory relayerSubwalletsPre = expressRelay
.getRelayerSubwallets();

address nonExistentSubwallet = makeAddr("nonExistentSubwallet");
vm.expectRevert(RelayerSubwalletNotFound.selector);
Expand Down Expand Up @@ -207,7 +204,6 @@ contract ExpressRelayUnitTest is Test, ExpressRelayTestSetup {
uint256 feeMax = 10 ** 18;
vm.prank(admin);
expressRelay.setFeeRelayer(feeMax);
uint256 feeRelayerPost = expressRelay.getFeeRelayer();

// test setting fee to a value higher than the highest valid value, should fail
uint256 fee = 10 ** 18 + 1;
Expand Down

0 comments on commit 38c81f5

Please sign in to comment.