You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using this package to work around a Firefox issue where the eth provider cannot be injected: MetaMask/metamask-extension#3133
On Chromium with no metamask extension installed, this package still creates a full provider object, though some of the properties are undefined.
I am just wondering what is the correct way to check if the provider is good to use. I am planning for now to check the value of chainId, but I don't know if this is actually a bug.
It's possible that I did have metamask installed at one point and have deleted since then. I am looking around chrome://about to see if I can find any local data that might be left behind, but I don't know exactly where it would be.
There's an event pair, connect/disconnect, and a related method, isConnected, that are supposed to be used for this purpose, but unfortunately they're not correctly implemented yet. I'll keep this issue open until they are.
Meanwhile, checking if the chainId is undefined is a good solution. The chainId is only populated if the provider successfully connects to MetaMask, so its absence implies the absence of MetaMask.
I am using this package to work around a Firefox issue where the eth provider cannot be injected: MetaMask/metamask-extension#3133
On Chromium with no metamask extension installed, this package still creates a full provider object, though some of the properties are undefined.
I am just wondering what is the correct way to check if the provider is good to use. I am planning for now to check the value of
chainId
, but I don't know if this is actually a bug.Here is the console.log output for the provider:
The text was updated successfully, but these errors were encountered: