Skip to content

Commit

Permalink
🚑 fix qr issue #3238
Browse files Browse the repository at this point in the history
  • Loading branch information
smashah committed Aug 21, 2024
1 parent c59bf23 commit 23d1d01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/controllers/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ export const needsToScan = (waPage: Page): Observable<unknown> => {
// }).catch(() => resolve(true))
// ]).catch(() => { })
// console.log("🚀 ~ needsToScan ~ raceResult:", raceResult)
const elementResult = await waPage.waitForSelector("canvas[aria-label='Scan me!']", { timeout: 0 }).catch(() => { })
console.log("🚀 ~ needsToScan ~ elementResult:", elementResult)
const elementResult = await Promise.race([
waPage.waitForSelector("canvas[aria-label='Scan this QR code to link a device!']", { timeout: 0 }).catch(() => { }),
waPage.waitForSelector("canvas[aria-label]", { timeout: 0 }).catch(() => { })
])
log.info("🚀 ~ needsToScan ~ elementResult:", elementResult)
resolve(false)
} catch (error) {
console.log("needsToScan -> error", error)
Expand Down
2 changes: 1 addition & 1 deletion src/lib/launch.js

Large diffs are not rendered by default.

0 comments on commit 23d1d01

Please sign in to comment.