Closed srirambv closed 4 years ago
Expected result: Should prompt to disable the extension and continue using browser crypto wallet
Maybe users can have a choice to pick their default, and/or select on each site (if they want to use multiple solutions).
I have issues using MM even when the brave crypto wallet is disabled. I'd love it if Metamask could still be used (without the need to re-import the key into the Brave crypto wallet).
@balresch after disabling Brave wallet, make sure to also close and reopen your browser. If you do not do this step, MetaMask will not function properly. Thanks!
Let me add a little bit of a code example. The following code is to connect to web3 browser using web3js library:
// Check for injected web3 (mist/metamask)
// Modern dapp browsers...
let web3Provider = null;
if (window.ethereum) {
web3Provider = window.ethereum;
try {
// Request account access
await window.ethereum.enable();
} catch (error) {
// User denied account access...
console.error("User denied account access to metamask");
return;
}
}
// Legacy dapp browsers...
else if (window.web3) {
web3Provider = window.web3.currentProvider;
}
else {
console.error("Unable to connect to metamask");
return;
}
let web3 = new Web3(web3Provider);
...
This works fine for all browsers but in brave it crashes when "crypto wallets" is enabled. The problem here is, that a check is missing. On the line where I have " console.error("Unable to connect to metamask");" I need to detect "crypto wallets" because I end up here if only "crypto wallets" is installed. Does anyone know how to make this check?
Also experiencing this. I'd love to be able to prompt the user. This error gets thrown in the console but I haven't found a good way to handle it yet, https://github.com/MetaMask/metamask-extension/commit/5ce94e69b311428d9d2f9b5502c02d3b960e380e
This will be fixed with the implementation of https://github.com/brave/brave-browser/issues/7503 which is coming soon. Closing this issue in favor of that.
Description
As a consequence of #6181, if you install MM and enable crypto wallet on browser, web3 sites like cryptokitties fail to load
Steps to Reproduce
0.69.132
Actual result:
Sites fail to load due to 2 crypto wallet being enabled. The workaround is to either uninstall MM or disable browser crypto wallet
Expected result:
Should prompt to disable the extension and continue using browser crypto wallet
Reproduces how often:
Easy
Brave version (brave://version info)
Version/Channel Information:
Other Additional Information:
Miscellaneous Information:
cc: @bbondy