Skip to content

Commit

Permalink
remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeExplorer29 committed Apr 17, 2024
1 parent 409a10b commit 59f80c1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
17 changes: 1 addition & 16 deletions contracts/modules/socialRecovery/base/BaseSocialRecovery.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ abstract contract BaseSocialRecovery is ISocialRecovery, EIP712 {
uint256 internal constant _DONE_TIMESTAMP = uint256(1);

bytes32 private constant _TYPE_HASH_SOCIAL_RECOVERY =
keccak256("SocialRecovery(address wallet,uint256 nonce, bytes32[] newOwner)");
keccak256("SocialRecovery(address wallet,uint256 nonce,bytes32[] newOwner)");

function walletNonce(address wallet) public view override returns (uint256 _nonce) {
return socialRecoveryInfo[wallet].nonce;
Expand Down Expand Up @@ -88,21 +88,6 @@ abstract contract BaseSocialRecovery is ISocialRecovery, EIP712 {
emit DelayPeriodSet(wallet, newDelay);
}

function cancelRecovery(bytes32 recoveryId) external {
address wallet = _msgSender();
if (!isOperationPending(wallet, recoveryId)) {
revert UNEXPECTED_OPERATION_STATE(
wallet,
recoveryId,
_encodeStateBitmap(OperationState.Waiting) | _encodeStateBitmap(OperationState.Ready)
);
}

delete socialRecoveryInfo[wallet].operationValidAt[recoveryId];
_increaseNonce(wallet);
emit RecoveryCancelled(wallet, recoveryId);
}

function cancelAllRecovery() external {
address wallet = _msgSender();
_increaseNonce(wallet);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ interface ISocialRecovery {

function setGuardian(bytes32 newGuardianHash) external;
function setDelayPeriod(uint256 newDelay) external;
function cancelRecovery(bytes32 recoveryId) external;

enum OperationState {
Unset,
Expand Down
2 changes: 1 addition & 1 deletion test/modules/socialRecovery/SocialRecoveryModule.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ contract SocialRecoveryModuleTest is Test {

uint256 delayTime;
bytes32 private constant _TYPE_HASH_SOCIAL_RECOVERY =
keccak256("SocialRecovery(address wallet,uint256 nonce, bytes32[] newOwner)");
keccak256("SocialRecovery(address wallet,uint256 nonce,bytes32[] newOwner)");
bytes32 private constant _TYPEHASH =
keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");
bytes32 private DOMAIN_SEPARATOR;
Expand Down

0 comments on commit 59f80c1

Please sign in to comment.