-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add functions which returns the user state is in module enabled or recovery is activated. #28
Changes from 3 commits
24ae687
246d80b
c3c67f7
d0b56b5
4850ef3
afa8076
96c734e
4424fdf
26685b4
ca8fb13
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -229,6 +229,15 @@ contract UniversalEmailRecoveryModule is | |
return getGuardianConfig(account).threshold != 0; | ||
} | ||
|
||
/** | ||
* Check if the recovery module is authorized to recover the account | ||
* @param account The smart account to check | ||
* @return true if the module is authorized, false otherwise | ||
*/ | ||
function isAuthorizedToBeRecovered(address account) external view returns (bool) { | ||
return validatorCount[account] > 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should I use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See comment on modified solution. Let me know what you think |
||
} | ||
|
||
/** | ||
* Check if a recovery request can be initiated based on guardian acceptance | ||
* @param account The smart account to check | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nitpick - why do we need assertions for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick - added suggestion for consistent naming with other functions in this file