debug: add retry auth button and increase wait time to 5s

This commit is contained in:
2026-02-07 05:40:20 +03:00
parent 5382579f9f
commit 4674e06251
5 changed files with 42 additions and 12 deletions
+2 -1
View File
@@ -22,7 +22,8 @@ interface AuthContextType {
const AuthContext = createContext<AuthContextType | null>(null);
// Wait for Telegram SDK to be ready with initData
function waitForInitData(maxAttempts = 10, intervalMs = 200): Promise<string | null> {
// 25 attempts * 200ms = 5 seconds max wait
function waitForInitData(maxAttempts = 25, intervalMs = 200): Promise<string | null> {
return new Promise((resolve) => {
let attempts = 0;