Skip to content
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

Please update the web3.js file according new changes ? Unable to get the accounts and other details of contract while using metamask. #15

Open
elixirautomation opened this issue Jan 10, 2019 · 2 comments

Comments

@elixirautomation
Copy link

Please suggest how to change this code according to new metamask security update.

Metamask Medium Post - New Changes

Now no accounts will be exposed by default and unable to show the account of testnet on UI.

import Web3 from "web3"; let web3; if (typeof window !== "undefined" && typeof window.web3 !== "undefined") { //We are in the browser and metamask is running. web3 = new Web3(window.web3.currentProvider); } else { //We are on ht browser OR the user is not running metamask const provider = new Web3.providers.HttpProvider( "https://rinkeby.infura.io/v3/<Infura_ID>" ); web3 = new Web3(provider); } export default web3;

@fullammo
Copy link

fullammo commented Jul 8, 2019

@lcsoundvision
Copy link

add localhost to connections in metamask

somesh-banerjee added a commit to somesh-banerjee/EthereumCasts that referenced this issue Jun 16, 2021
Metamask is no longer exposing accounts by default, so enabling it manually
somesh-banerjee added a commit to somesh-banerjee/EthereumCasts that referenced this issue Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants