File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,10 @@ pub async fn check_access(
31
31
let current_time = Utc :: now ( ) ;
32
32
let is_in_withdraw_period = current_time > channel. spec . withdraw_period_start ;
33
33
34
+ if current_time > channel. valid_until {
35
+ return Err ( Error :: ChannelIsExpired ) ;
36
+ }
37
+
34
38
// We're only sending a CLOSE
35
39
// That's allowed for the creator normally, and for everyone during the withdraw period
36
40
if events. iter ( ) . all ( is_close_event)
@@ -44,10 +48,6 @@ pub async fn check_access(
44
48
return Err ( Error :: OnlyCreatorCanCloseChannel ) ;
45
49
}
46
50
47
- if current_time > channel. valid_until {
48
- return Err ( Error :: ChannelIsExpired ) ;
49
- }
50
-
51
51
if is_in_withdraw_period {
52
52
return Err ( Error :: ChannelIsInWithdrawPeriod ) ;
53
53
}
You can’t perform that action at this time.
0 commit comments