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

Metamask crashes after the connector starts #17

Open
dbarasti opened this issue Jun 19, 2020 · 0 comments
Open

Metamask crashes after the connector starts #17

dbarasti opened this issue Jun 19, 2020 · 0 comments

Comments

@dbarasti
Copy link

dbarasti commented Jun 19, 2020

I'm trying to authenticate transactions using metamask. I execute the following code but once I connect to page localhost:3333, MetaMask plugin crashes. It tries to show me the transaction notification but then goes blank.

async function connectToMetamask() {
  const connector = new MetaMaskConnector({
    port: 3333,
    onConnect() {
      console.log('MetaMask client connected')
    },
  });

  // Now go to http://localhost:3333 in your MetaMask enabled web browser.
  console.log("Go to http://localhost:3333");
  await connector.start();
  const web3 = new Web3(connector.getProvider());
  // Use web3 as you would normally do. Sign transactions in the browser.
  CampaignContract.setProvider(connector.getProvider());
}

Screenshot from 2020-06-19 12-10-59

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

1 participant