From c604fd85678657d7c76fbc079b58b9f599cf18c3 Mon Sep 17 00:00:00 2001 From: imduchuyyy Date: Sat, 18 May 2024 10:48:26 +0700 Subject: [PATCH] recover module --- src/modules/Recovery.sol | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/modules/Recovery.sol b/src/modules/Recovery.sol index 0fec81f..c8efc46 100644 --- a/src/modules/Recovery.sol +++ b/src/modules/Recovery.sol @@ -41,6 +41,11 @@ contract Recovery is IModule { _; } + modifier onlyWallet() { + require(msg.sender == _wallet, "Only wallet can call"); + _; + } + function _setGuardian(address guardian, bool status) internal { _isGuardians[guardian] = status; @@ -81,6 +86,7 @@ contract Recovery is IModule { function validateUserOp(UserOperation calldata userOp, bytes32 userOpHash) external override + onlyWallet() returns (uint256 validationData) { require(msg.sender == _wallet, "Wrong wallet"); @@ -90,6 +96,7 @@ contract Recovery is IModule { public view override + onlyWallet() returns (bytes4 magicValue) { return 0x0000;