MetaMask / MetaMask/detect-provider
Does not detect ethereum provider if redirection happens into the metamask mobile browser
- Dominant language
- JavaScript
- Stars
- 238
- Forks
- 63
- PR merge metrics
- No merged PRs in 30d
Description
If a dApp redirects the user to the metamask mobile app using deep-link, then this library does not detect provider on page load,
```
const provider = await detectEthereumProvider();
if (provider) {
// Detected
} else {
// window.ethereum is undefined
}
```
When the dApp opens into the metamask mobile app browser, then always for the first time, it goes into the else condition and when page is reloaded, then it works fine.
Any suggestion is appreciated.
Thanks.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the detectEthereumProvider() entry point and reproduce the first-load behavior after a dApp deep-links into the MetaMask mobile browser, comparing it with a reload. Trace when provider detection runs and verify that the provider is detected on the initial page load without breaking the existing reload case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- blockchain, mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100