-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Nft chainId and current global chainId arent always the same (#3…
…0517) ## **Description** Fixes a bug, where the network badge on the top of the nft in the nft details page did not correspond to the chain it belonged to. This resulted in navigating to send screen on a network that the NFT did not belong to. This PR introduces two things: 1. Show correct NFT chain badge on NFT details screen, regardless of which network user is on 2. When navigating to the send flow for an NFT, where the network the NFT belongs to is not the globally selected chainId, change the network on behalf of the user so that the globally selected chainId is the same as the NFT being sent. [](https://codespaces.new/MetaMask/metamask-extension/pull/30517?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to NFT Grid 2. Navigate to an NFT details screen on Ethereum Mainnet 3. Change global network to Linea 4. Should not see the network badge change on the NFT 5. Click send 6. See that network is changed on behalf of user from Linea back to Ethereum, where the NFT belongs ## **Screenshots/Recordings** ### **Before** https://github.com/user-attachments/assets/a2620999-6ce5-4d10-91ec-2531063ee2ca ### **After** https://github.com/user-attachments/assets/06d294eb-73d6-46ba-aa75-b463d6da0a66 ## **Pre-merge author checklist** - [x] 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). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] 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. 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
Showing
3 changed files
with
89 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters