diff --git a/src/EmailRecoveryManager.sol b/src/EmailRecoveryManager.sol index 31ef8e40..15798f26 100644 --- a/src/EmailRecoveryManager.sol +++ b/src/EmailRecoveryManager.sol @@ -107,7 +107,7 @@ abstract contract EmailRecoveryManager is * @notice Checks if the recovery is activated for a given account * @param account The address of the account for which the activation status is being checked * @return bool True if the recovery request is activated, false otherwise - */ + */ function isActivated(address account) public view override returns (bool) { return guardianConfigs[account].threshold > 0; } @@ -385,10 +385,6 @@ abstract contract EmailRecoveryManager is } RecoveryRequest memory recoveryRequest = recoveryRequests[account]; - if (!isActivated(account)) { - revert RecoveryIsNotActivated(); - } - uint256 threshold = guardianConfigs[account].threshold; if (threshold == 0) { revert NoRecoveryConfigured(); diff --git a/test/integration/EmailRecoveryManager/EmailRecoveryManager.integration.t.sol b/test/integration/EmailRecoveryManager/EmailRecoveryManager.integration.t.sol index 47375887..73245faf 100644 --- a/test/integration/EmailRecoveryManager/EmailRecoveryManager.integration.t.sol +++ b/test/integration/EmailRecoveryManager/EmailRecoveryManager.integration.t.sol @@ -171,7 +171,7 @@ contract EmailRecoveryManager_Integration_Test is instance1.uninstallModule(MODULE_TYPE_EXECUTOR, recoveryModuleAddress, ""); vm.stopPrank(); - vm.expectRevert(IEmailRecoveryManager.RecoveryIsNotActivated.selector); + vm.expectRevert(IEmailRecoveryManager.NoRecoveryConfigured.selector); emailRecoveryModule.completeRecovery(accountAddress1, recoveryCalldata1); } @@ -219,7 +219,7 @@ contract EmailRecoveryManager_Integration_Test is instance1.uninstallModule(MODULE_TYPE_EXECUTOR, recoveryModuleAddress, ""); vm.stopPrank(); - vm.expectRevert(IEmailRecoveryManager.RecoveryIsNotActivated.selector); + vm.expectRevert(IEmailRecoveryManager.NoRecoveryConfigured.selector); emailRecoveryModule.completeRecovery(accountAddress1, recoveryCalldata1); } diff --git a/test/unit/assertErrorSelectors.t.sol b/test/unit/assertErrorSelectors.t.sol index 6f06493b..00bfbd9f 100644 --- a/test/unit/assertErrorSelectors.t.sol +++ b/test/unit/assertErrorSelectors.t.sol @@ -51,6 +51,7 @@ contract LogErrorSelectors_Test is Test { assertEq(IEmailRecoveryManager.RecoveryRequestExpired.selector, bytes4(0x566ad75e)); assertEq(IEmailRecoveryManager.InvalidCalldataHash.selector, bytes4(0x54d53855)); assertEq(IEmailRecoveryManager.NoRecoveryInProcess.selector, bytes4(0x87434f51)); + assertEq(IEmailRecoveryManager.RecoveryIsNotActivated.selector, bytes4(0xc737140f)); } function test_EmailRecoveryUniversalFactory_AssertSelectors() public {