anza-xyz / anza-xyz/wallet-adapter

Use `requestIdleCallback` when polling for wallets, if available

Aperta
#334 2 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
2k
Fork
1.1k
Merge medio
10h 19m
PR unite (30g)
3

Descrizione

This is a follow on from #327. If we're going to poll for wallets indefinitely in `scopePollingDetectionStrategy` (eg. to capture the case where a wallet is installed in the browser mid-session) then let's use `requestIdleCallback` wherever available. This will make it so that the polling work never blocks work that the app has scheduled at a high priority.

See https://developer.mozilla.org/en-US/docs/Web/API/Background_Tasks_API for how this works.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.