-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Question: How to detect if MetaMask is installed? #1158
Comments
The way I'm doing is simply checking in my frontend js this: However, since metamask may not be able to inject web3 in time for app load, it's best to set a timeout with a callback checking this 1-3-ish seconds prior to loading. |
Rather than set a timer, we recommend waiting for the |
Also: |
Maybe there is a trick to it, but for me this is still not working... No error in the console, nothing absolute nothing. I am using Chrome Version 64.0.3282.186 (Official Build) (64-bit) on ArchLinux. Metamask is pointed to a private Ethereum blockchain neteork and it is showing correctly balances for few accounts I have defined at creation time inside the network. Here it is the code I am using. Needless to say I am extremely frustrated for getting stuck at such a simple step. Please note: in other contexts (e.g. wallet.ethereum.org) this seems to work as expected. Help would be highly appreciated. function onLoad() {
} |
@aghiugan please open a new issue to discuss this problem. You might also get good community help by posting on stackexchange. It looks like you're doing things right, so the more reproduction details you can provide, the better. Maybe worth creating a full reproduction github repository for people to try reproducing with. |
is there a global variable or local storage item to check if metamask is installed?
The text was updated successfully, but these errors were encountered: