Skip to content

Commit

Permalink
fix: add supported interface to NativeTokenLimitModule
Browse files Browse the repository at this point in the history
  • Loading branch information
Zer0dot committed Nov 15, 2024
1 parent 48a77f0 commit 9dfe436
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/modules/permissions/NativeTokenLimitModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {IERC165, ModuleBase} from "../ModuleBase.sol";
/// @notice This module supports a total native token spend limit across User Operation gas and native transfers.
/// - None of the functions are installed on the account. Account states are to be retrieved from this global
/// singleton directly.
/// - This module only tracks native transfers for the 4 functions `execute`, `executeBatch`, `performCreate`.
/// - This module only tracks native transfers for the 3 functions `execute`, `executeBatch`, `performCreate`.
/// - By default, using a paymaster in a UO would cause the limit to not decrease. If an account uses a special
/// paymaster that converts non-native tokens in the account to pay for gas, this paymaster should be added to
/// the `specialPaymasters` list to enable the correct accounting of spend limits. When these paymasters are used
Expand Down Expand Up @@ -153,7 +153,8 @@ contract NativeTokenLimitModule is ModuleBase, IExecutionHookModule, IValidation

/// @inheritdoc ModuleBase
function supportsInterface(bytes4 interfaceId) public view override(ModuleBase, IERC165) returns (bool) {
return interfaceId == type(IExecutionHookModule).interfaceId || super.supportsInterface(interfaceId);
return interfaceId == type(IExecutionHookModule).interfaceId
|| interfaceId == type(IValidationHookModule).interfaceId || super.supportsInterface(interfaceId);
}

function _decreaseLimit(uint32 entityId, PackedUserOperation calldata userOp, bool hasPaymaster) internal {
Expand Down

0 comments on commit 9dfe436

Please sign in to comment.