Unnecessary wait on desktop when not metamask installed
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!:)
some desktop browser wallets may inject the provider asynchronously, i think.