Skip to content

Commit a4a245e

Browse files
fix: unlimited passport validation
1 parent 9c9c460 commit a4a245e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/pages/Home/index.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,8 @@ const Home = () => {
162162
}, []);
163163

164164
const isPassportValid = (expires: number | undefined) => {
165-
if (!expires) {
166-
return false
167-
}
165+
if (!expires) return false
166+
if (expires > 32503690800000) return true;
168167

169168
const now = Math.floor(Date.now());
170169
const expiresDate = new Date(expires * 1000);
@@ -182,7 +181,7 @@ const Home = () => {
182181
if (window?.webkit) {
183182
window?.webkit?.messageHandlers["stopVPN"].postMessage(null)
184183
setPower(false);
185-
}
184+
}
186185
//@ts-ignore
187186
if (window?.Android) {
188187
//@ts-ignore
@@ -194,7 +193,7 @@ const Home = () => {
194193
setPower(false);
195194
}
196195
} catch (ex) { }
197-
196+
198197
setTimeout(() => setIsConnectionLoading(false), 1000)
199198
return
200199
}

0 commit comments

Comments
 (0)