Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: `Cannot destructure property 'balance' of 'K[Z]' as it is undefi…
…ned` fromAddress error when no transaction is loaded in ConfirmTransactionBase (#25506) In `confirm-transaction-base.container.js`, while the transaction is switching, the component may be in a state without transaction data. In this case, we can handle the empty transaction data appropriately until the expected data comes in to allow the user flow to continue without breaking. **note:** I was unable to reproduce this in `develop` after some time, but I successfully repro'd this in `Version-v12.0.0` which allowed me to verify the fix works. Possibly the underlying empty transaction data state was fixed by other code in `develop` This PR is planned to be cherry-picked for Version-v12.0.0 Fixes: #25406 See [Issue](#25406) for repro steps `confirm-transaction-base.container.js` ![CleanShot 2024-06-25 at 15 58 13@2x](https://github.com/MetaMask/metamask-extension/assets/20778143/4c3ccc3f-8583-4b76-b6cc-9bebc1f1045c) See error in [Issue](#25406) screenshots No error message is shown and app works as expected <!-- [screenshots/recordings] --> - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
- Loading branch information