MetaMask / MetaMask/metamask-mobile
[Bug]: Send flow should adapt user preference of `displayNftMedia`
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 1.7k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 669
Description
**Describe the bug**
`displayNftMedia` is one of our security feature that prevents user to fetch NFT images to not expose their IP address etc.
In send flow we are fetching and showing NFT images regardless of the setting. If that is opted-out, send flow shouldn't show any images or do any collection fetches.
This is an example of available data for an NFT when user opted-out.
```
{
"address": "0xD7d99A1405CcaF31F7b0dae8Da92D95c857102e2",
"tokenId": "374",
"favorite": false,
"isCurrentlyOwned": true,
"name": null,
"description": null,
"image": null,
"standard": "ERC721",
"tokenURI": "https://cloudflare-ipfs.com/ipfs/bafybeiguvvbuj2oykjultphek6fd6mbbjptvtmb2dho4lb4daiftdsxyr4/374.json",
"chainId": 1
}
```
If we want users to use sending ability of NFTs when they opted-out, we need to design an NFT sending without image/name etc.
**Steps to reproduce**
1. Opt out `displayNFTMedia`
2. User can still see NFT images in the send flow (which should not be able to)
**Error messages or log output**
```shell
```
**Detection stage**
On main branch
**Version**
main
**Build type**
None
**Device**
All
**Operating system**
Other (please elaborate in the "Additional Context" section)
Contributor guide
Research direction
Start in the mobile send flow and trace how the displayNFTMedia preference controls NFT image and collection fetching. Confirm the behavior when the preference is disabled, then determine how NFT sending should work without media or names; done means the send flow respects the preference and avoids those fetches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100