Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
skosito committed Aug 7, 2024
1 parent 8c3e4f6 commit f11f4be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion v2/src/evm/GatewayEVM.sol
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ contract GatewayEVM is
if (!resetApproval(token, to)) revert ApprovalFailed();
if (!IERC20(token).approve(to, amount)) revert ApprovalFailed();
// Execute the call on the target contract
bytes memory result = _execute(to, data);
_execute(to, data);

// Reset approval
if (!resetApproval(token, to)) revert ApprovalFailed();
Expand Down
4 changes: 2 additions & 2 deletions v2/test/GatewayEVM.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ contract GatewayEVMTest is Test, IGatewayEVMErrors, IGatewayEVMEvents, IReceiver
gateway.execute(address(receiver), data);
}

function testExecuteWithERC20FailsIfNotCustoryOrConnector() public {
function testExecuteWithERC20FailsIfNotCustodyOrConnector() public {
uint256 amount = 100_000;
bytes memory data =
abi.encodeWithSignature("receiveERC20(uint256,address,address)", amount, address(token), destination);
Expand All @@ -174,7 +174,7 @@ contract GatewayEVMTest is Test, IGatewayEVMErrors, IGatewayEVMEvents, IReceiver
gateway.executeWithERC20(address(token), destination, amount, data);
}

function testRevertWithERC20FailsIfNotCustoryOrConnector() public {
function testRevertWithERC20FailsIfNotCustodyOrConnector() public {
uint256 amount = 100_000;
bytes memory data =
abi.encodeWithSignature("receiveERC20(uint256,address,address)", amount, address(token), destination);
Expand Down

0 comments on commit f11f4be

Please sign in to comment.