Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecessary wait on desktop when not metamask installed #34

Open
microHoffman opened this issue Oct 3, 2021 · 1 comment
Open

Unnecessary wait on desktop when not metamask installed #34

microHoffman opened this issue Oct 3, 2021 · 1 comment

Comments

@microHoffman
Copy link

microHoffman commented Oct 3, 2021

Hello, I'm wondering - if I understand this correctly, if there is a window.ethereum object on desktop, it's available synchronously on website load. But still, when you dont have metamask installed on the desktop, it still waits for the set timeout (3s by default). But this wait is not necessary in this situation on desktop, is it? Is it necessary on mobile, when the window.ethereum is injected asynchronously and it can take some time, right?

Have you considered adding there another check after first check on window.ethereum to check, if I am on desktop and if I was and initial window.ethereum check would return false, the detectEthereumProvider would resolve with null immediately? I can try submit a PR, if this makes sense and I understand this correctly. Thanks!:)

@based64-eth
Copy link

some desktop browser wallets may inject the provider asynchronously, i think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants