diff --git a/modules/allowances/contracts/AllowanceModule.sol b/modules/allowances/contracts/AllowanceModule.sol index 5a83a4bd0..8a3525a5b 100644 --- a/modules/allowances/contracts/AllowanceModule.sol +++ b/modules/allowances/contracts/AllowanceModule.sol @@ -4,7 +4,7 @@ pragma solidity >=0.7.0 <0.8.0; import "./Enum.sol"; import "./SignatureDecoder.sol"; -interface GnosisSafe { +interface ISafe { /// @dev Allows a Module to execute a Safe transaction without any further confirmations. /// @param to Destination address of module transaction. /// @param value Ether value of module transaction. @@ -150,7 +150,7 @@ contract AllowanceModule is SignatureDecoder { /// @param delegate Delegate whose allowance should be updated. /// @param signature Signature generated by the delegate to authorize the transfer. function executeAllowanceTransfer( - GnosisSafe safe, + ISafe safe, address token, address payable to, uint96 amount, @@ -239,7 +239,7 @@ contract AllowanceModule is SignatureDecoder { return keccak256(generateTransferHashData(safe, token, to, amount, paymentToken, payment, nonce)); } - function checkSignature(address expectedDelegate, bytes memory signature, bytes memory transferHashData, GnosisSafe safe) private view { + function checkSignature(address expectedDelegate, bytes memory signature, bytes memory transferHashData, ISafe safe) private view { address signer = recoverSignature(signature, transferHashData); require( expectedDelegate == signer && delegates[address(safe)][uint48(signer)].delegate == signer, @@ -261,7 +261,7 @@ contract AllowanceModule is SignatureDecoder { if (v == 0) { revert("Contract signatures are not supported by this module"); } else if (v == 1) { - // If v is 1 we also use msg.sender, this is so that we are compatible to the GnosisSafe signature scheme + // If v is 1 we also use msg.sender, this is so that we are compatible to the Safe signature scheme owner = msg.sender; } else if (v > 30) { // To support eth_sign and similar we adjust v and hash the transferHashData with the Ethereum message prefix before applying ecrecover @@ -274,7 +274,7 @@ contract AllowanceModule is SignatureDecoder { require(owner != address(0), "owner != address(0)"); } - function transfer(GnosisSafe safe, address token, address payable to, uint96 amount) private { + function transfer(ISafe safe, address token, address payable to, uint96 amount) private { if (token == address(0)) { // solium-disable-next-line security/no-send require(safe.execTransactionFromModule(to, amount, "", Enum.Operation.Call), "Could not execute ether transfer");