Skip to content

Commit

Permalink
recover module
Browse files Browse the repository at this point in the history
  • Loading branch information
imduchuyyy committed May 18, 2024
1 parent 56b2be9 commit c604fd8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/modules/Recovery.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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");
Expand All @@ -90,6 +96,7 @@ contract Recovery is IModule {
public
view
override
onlyWallet()
returns (bytes4 magicValue)
{
return 0x0000;
Expand Down

0 comments on commit c604fd8

Please sign in to comment.