Locking account doesn't fully disconnect the user from the application
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.5k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
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).
Only at this point does mm return null for active account, etc.
Steps to Reproduce
- Go to app.uniswap.org
- Unlock metamask
- connect an account
- lock metamask
- input swap info
- attempt swap
- 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the flow at app.uniswap.org: unlock MetaMask, connect an account, lock MetaMask, then enter swap details and attempt a swap. Investigate how the application detects account locking and whether MetaMask emits an event; done means the account is disabled immediately after locking and the reported transaction error no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100