MetaMask / MetaMask/metamask-extension
[Bug]: MM breaks with the error `Cannot read properties of undefined (reading 'balance')`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
Describe the bug
Problem: whenever I trigger a Get Encryption Key request from a dapp and a subsequent transaction, MetaMask breaks with the error Cannot read properties of undefined (reading 'balance')
Expected behavior
- MM should not break
- We should display the subsequent tx
Screenshots/Recordings
https://github.com/MetaMask/metamask-extension/assets/54408225/fa660603-674d-490f-bb9d-4e742cf36aa3
Steps to reproduce
- Go to the test dapp
- Trigger Get Encryption Key
- Without accepting nor rejecting, trigger a transaction
- Reject the Get Encryption Key request
- See wallet breaks
Version
11.10.0 but possibly earlier
Build type
None
Browser
Chrome
Operating system
Linux
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 with the test dapp and reproduce the sequence of requesting an encryption key, triggering a transaction, and rejecting the key request. Trace the request and transaction handling around the reported undefined balance error; done means the wallet does not break and the subsequent transaction is displayed.
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