Skip to content

Commit 3912518

Browse files
committed
Fix TTL check
1 parent 9beeed2 commit 3912518

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/shutter-service/ShutterEventTriggerRegistry.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,11 @@ contract ShutterEventTriggerRegistry is Ownable {
8484
EventTriggerRegistration storage registrationData = registrations[
8585
identity
8686
];
87-
// Ensure no one is trying to decrease ttl.
88-
require(registrationData.ttl < ttl, TTLTooShort());
8987

9088
if (registrationData.ttl != 0) {
89+
// Ensure no one is trying to decrease ttl.
90+
require(registrationData.ttl < ttl, TTLTooShort());
91+
9192
require(
9293
keccak256(abi.encode(triggerDefinition)) ==
9394
registrationData.triggerDefinitionHash,

0 commit comments

Comments
 (0)