Skip to content

Locking account doesn't fully disconnect the user from the application #2350

Open
@JFrankfurt

Description

@JFrankfurt

Bug Description
When a user disconnects their mm the injected provider still returns their account 0 information. The provider appears to still be accessible. (We can still get L2 quotes, for example.) Things fall apart when the user attempts to construct a transaction (see screenshot).

image

Only at this point does mm return null for active account, etc.

Steps to Reproduce

  1. Go to app.uniswap.org
  2. Unlock metamask
  3. connect an account
  4. lock metamask
  5. input swap info
  6. attempt swap
  7. observe error

Expected Behavior
User's account info should be disabled immediately when the user locks their account.

Additional Context
This seems like a metamask bug, but we may be able to get around it if metamask emits events on lock. @NoahZinsmeister is looking into this rn.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp1Great to have, implement first thing after p0s

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions