mirror of
https://github.com/pezkuwichain/pezkuwi-telegram-miniapp.git
synced 2026-08-12 19:41:36 +00:00
debug: add retry auth button and increase wait time to 5s
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user