@@ -583,12 +583,12 @@ contract AccessManager is Context, Multicall, IAccessManager {
583
583
address caller = _msgSender ();
584
584
585
585
// Fetch restrictions that apply to the caller on the targeted function
586
- (bool immediate , uint32 setback ) = _canCallExtended (caller, target, data);
586
+ (, uint32 setback ) = _canCallExtended (caller, target, data);
587
587
588
588
uint48 minWhen = Time.timestamp () + setback;
589
589
590
- // if call is not authorized, or if requested timing is too soon
591
- if (( ! immediate && setback == 0 ) || (when > 0 && when < minWhen)) {
590
+ // if call with delay is not authorized, or if requested timing is too soon
591
+ if (setback == 0 || (when > 0 && when < minWhen)) {
592
592
revert AccessManagerUnauthorizedCall (caller, target, _checkSelector (data));
593
593
}
594
594
@@ -645,11 +645,12 @@ contract AccessManager is Context, Multicall, IAccessManager {
645
645
revert AccessManagerUnauthorizedCall (caller, target, _checkSelector (data));
646
646
}
647
647
648
- // If caller is authorised, check operation was scheduled early enough
649
648
bytes32 operationId = hashOperation (caller, target, data);
650
649
uint32 nonce;
651
650
652
- if (setback != 0 ) {
651
+ // If caller is authorised, check operation was scheduled early enough
652
+ // Consume an available schedule even if there is no currently enforced delay
653
+ if (setback != 0 || getSchedule (operationId) != 0 ) {
653
654
nonce = _consumeScheduledOp (operationId);
654
655
}
655
656
0 commit comments