Refactor Time library to use valueBefore/valueAfter (#4555)
Co-authored-by: Francisco <fg@frang.io>
This commit is contained in:
@ -60,7 +60,7 @@ contract AccessManager is Context, Multicall, IAccessManager {
|
||||
// Structure that stores the details for a group/account pair. This structure fits into a single slot.
|
||||
struct Access {
|
||||
// Timepoint at which the user gets the permission. If this is either 0, or in the future, the group permission
|
||||
// is not available. Should be checked using {Time-isSetAndPast}
|
||||
// is not available.
|
||||
uint48 since;
|
||||
// delay for execution. Only applies to restricted() / relay() calls. This does not restrict access to
|
||||
// functions that use the `onlyGroup` modifier.
|
||||
@ -235,7 +235,7 @@ contract AccessManager is Context, Multicall, IAccessManager {
|
||||
return (true, 0);
|
||||
} else {
|
||||
(uint48 inGroupSince, uint32 currentDelay, , ) = getAccess(groupId, account);
|
||||
return (inGroupSince.isSetAndPast(Time.timestamp()), currentDelay);
|
||||
return (inGroupSince != 0 && inGroupSince <= Time.timestamp(), currentDelay);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user