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

bugfix: show extension window if locked regardless of approval #6619

Merged
merged 1 commit into from
May 16, 2019

Conversation

bitpshr
Copy link
Contributor

@bitpshr bitpshr commented May 16, 2019

The new 1102 implementation short-circuits an enable call if privacy mode is disabled or if a cached approval exists, but the old implementation also checked if the extension was unlocked. I think this is the source of reported issues: we should always act as if no approval exists if the extension is locked, which gives users a chance to unlock it. This matches the functionality of the old implementation.

Resolves #6618

To test:

  1. Open a webpage.
  2. Call ethereum.enable() from the console.
  3. Log in and / or approve.
  4. Log out of MetaMask.
  5. Call ethereum.enable() again from the console.
  6. You should be presented with a login and approval prompt again. Before this PR, nothing would happen.

@metamaskbot
Copy link
Collaborator

Builds ready [8c0bc7b]: chrome, firefox, edge, opera

Copy link
Contributor

@whymarrh whymarrh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me, comparing this change with the old implementation.[1]

Copy link
Contributor

@danfinlay danfinlay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple fix, and confirmed it works locally.

@danfinlay danfinlay merged commit e880e27 into develop May 16, 2019
@danfinlay danfinlay deleted the bugfix/enable-locked branch May 16, 2019 15:53
@karlito636
Copy link

Hi guys. I'm not familiar with bug fix flow. When this fix will be available in the chrome extension? or is it already updated?

@whymarrh
Copy link
Contributor

Yes, this is included in version 6.3.5 which was released yesterday.

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

Successfully merging this pull request may close these issues.

ethereum.enable() doesn't open metamask when logged out
5 participants