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

If you close password prompt window, ethereum.enable() wont resolve/reject #5700

Closed
mmv08 opened this issue Nov 8, 2018 · 2 comments
Closed

Comments

@mmv08
Copy link

mmv08 commented Nov 8, 2018

Describe the bug
Calling provider.enable() for the user with locked metamask opens a new window asking the user to type their password, however if the user closes this window, promise is not rejected. As a developer I want to know if the user closes it

Also from UX perspective maybe it would make sense to open accept/decline modal first, and if the user with locked metamask accepts it it may show a window like: "To accept this, unlock your wallet"

To Reproduce
Steps to reproduce the behavior:

  1. Lock metamask
  2. Call provider.enable()
  3. New metamask window is opened, close it
  4. Wait for the promise to resolve/reject, it won't

Expected behavior
An error is thrown

Browser details (please complete the following information):

  • OS: macOS Mojave 10.14.1
  • Chrome Version 70.0.3538.77 (Official Build) (64-bit)
  • MetaMask Version 5.0.1
  • Beta UI

Additional context
Add any other context about the problem here.

@mmv08
Copy link
Author

mmv08 commented Nov 8, 2018

this may be related to #3124

@bitpshr
Copy link
Contributor

bitpshr commented Nov 8, 2018

Hi @mikheevm, thanks for taking the time to report this issue.

For now, this is intended behavior: when a dapp calls ethereum.enable() and an approval popup is shown to the user, the user must respond to the popup before using MetaMask again, similar to transaction requests. Specifically, if the user closes an approval request via the chrome without approving or rejecting it, they will still see the approval request waiting for their response the next time they open MetaMask. This means that when a user closes an approval request rather than responding to it, it's the same as if they minimized it: the Promise will continue to hang, waiting for either an explicit approval or rejection.

You're correct, this is directly related to #3124, where we're discussing the ramifications of rejecting transactions (and approval requests) if the window is closed. Please feel free to follow that issue for updates to this UX.

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

2 participants