Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: close network/accounts toasts when opening the Edit page (#29239)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> This PR fixes the issue where toasts persist after navigating between `Permissions view` > `Edit networks` or `Edit accounts`. The fix ensures the toast dismisses upon navigating to edit in the Permissions modal. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29239?quickstart=1) ## **Related issues** Fixes: #27808 ## **Manual testing steps** 1. Connect a dapp and grant permissions. 2. Go to the Connection icon > Permissions view > Accounts > Edit. 3. Change the account selection. 4. Update and verify the toast confirms account permissions were updated. 5. Navigate to Networks > Edit. 6. Change the network selection. 7. Update and verify the toast confirms network permissions were updated. 8. Confirm no stale toast persists after each navigation. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** ![Brave Browser 2024-10-11 at 4 24 18 PM](https://github.com/user-attachments/assets/a011d199-e0cc-40a7-b059-16d808c18964) ### **After** https://github.com/user-attachments/assets/6cdd3b9d-90ce-4435-aea8-cf990b8b985a ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.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/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g., pulled and built the branch, ran the app, tested the 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