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

Extension closing #26

Open
EmanuelCampos opened this issue May 6, 2022 · 2 comments
Open

Extension closing #26

EmanuelCampos opened this issue May 6, 2022 · 2 comments

Comments

@EmanuelCampos
Copy link

Hey guys,

Are you having an issue when you connect your wallet or sign metamask extension in another extension both extensions close, have a workaround/way for solve it?

@danfinlay
Copy link
Contributor

I don't think extensions have much or any control over whether their action views are open.

@sunxivincent
Copy link

@EmanuelCampos did you end up solving this issue? I am building up a chrome extension using react. I am doing below code in a button click event handler and expect after signing, it can go back to my popup's main page, however the Metamask closed both itself and my chrome extension popup. But when I put some breakpoint in the code, the behavior is expected. Sample code is as below shown.

const onClick = async() => {
  setLoading(true);
  const web3 = new Web3(provider); 
  const accounts = await web3.eth.requestAccounts();
  const account = accounts[0];
  await web3.eth.personal.sign(XXX, account.toLowerCase(), "");
  setLoading(false);
};
  return <LoginWall onClick={onClick}></LoginWall>

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