Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: catch error for getTokenStandardAndDetails (#26269)
## **Description** Related to this reported Sentry error: https://metamask.sentry.io/issues/5660074561/?environment=production&project=273505&query=firstRelease%3A12.0.0&referrer=issue-stream&sort=freq&statsPeriod=90d&stream_index=22 Inside Import-nfts-modal.js we call `getTokenStandardAndDetails` without catching the case where this call fails. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/26269?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. To mock this behavior you can go to fct getTokenStandardAndDetails and throw an error there 2. Import any NFT 3. The import NFT modal should not stay hanging after import ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/e75867ca-ecbc-451b-b18e-0f55d6f10dfe ### **After** <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/7c647d80-7470-45ae-a482-7a6cfb095a82 ## **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/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. ## **Pre-merge reviewer checklist** - [ ] 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