Skip to content

Commit 23d1d01

Browse files
committed
🚑 fix qr issue #3238
1 parent c59bf23 commit 23d1d01

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/controllers/auth.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ export const needsToScan = (waPage: Page): Observable<unknown> => {
3232
// }).catch(() => resolve(true))
3333
// ]).catch(() => { })
3434
// console.log("🚀 ~ needsToScan ~ raceResult:", raceResult)
35-
const elementResult = await waPage.waitForSelector("canvas[aria-label='Scan me!']", { timeout: 0 }).catch(() => { })
36-
console.log("🚀 ~ needsToScan ~ elementResult:", elementResult)
35+
const elementResult = await Promise.race([
36+
waPage.waitForSelector("canvas[aria-label='Scan this QR code to link a device!']", { timeout: 0 }).catch(() => { }),
37+
waPage.waitForSelector("canvas[aria-label]", { timeout: 0 }).catch(() => { })
38+
])
39+
log.info("🚀 ~ needsToScan ~ elementResult:", elementResult)
3740
resolve(false)
3841
} catch (error) {
3942
console.log("needsToScan -> error", error)

src/lib/launch.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)