fix: nft images not loading (flaky) cp-7.64.0#25705
Conversation
c6cef3c
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
The primary impact is on NFT sending confirmations where users select and send NFTs. The changes improve IPFS image resolution and handle edge cases better. The RemoteImage component is used broadly, but the change is a defensive improvement that prevents rendering with invalid URIs. Why SmokeConfirmations: The NFT component changes, useNfts hook, and related test files are all in the Why not other tags:
Performance Test Selection: |
|



Description
Seeing a bug with NFT import on mobile for a custom network. On extension, the image for this NFT shows up just fine after import. On mobile, the image is blank. Multiple users have reported this.
Mobile:

Extension:

Solution:
@sahar-fehri spotted that the difference between Extension and Mobile was the IPFS gateway, following that piece of information we identified where to change the ipfs url so that we only had to modify the cleint (mobile) and not core.
Furthermore, after fixing that issue, we spotted some kind of flakiness where images were sometimes displayed and other times werent. This was due to the image being null while decoding the IPFS url which triggered expo-image calling
onErrorand therefore not loading the imageFinally, I also found an existing bug on @MetaMask/confirmations where IPFS images are not resolved
Changelog
CHANGELOG entry: nft images not loading for ApexYugalabs + flakiness
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-2610
Manual testing steps
Screenshots/Recordings
Before
After
Screen.Recording.2026-02-05.at.16.37.35.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Changes NFT/IPFS image resolution and controller init parameters; while localized, it affects how NFT media URLs are derived and rendered across key user flows.
Overview
Fixes flaky/blank NFT images by avoiding rendering
expo-imagewith an empty URI while anipfs://URL is still resolving:RemoteImagenow returnsnullduring the initial IPFS resolution state, with a new unit test covering the loading case and updated snapshots where the image subtree is absent until resolved.Adds IPFS resolution to confirmations’
useEVMNftstransformation: image selection now asynchronously convertsipfs://candidates viagetFormattedIpfsUrlusing the app’s configured gateway, falling back to the next URL when resolution returns''/nullor throws (with logging). Tests were updated/added to cover these fallback cases and to de-flake the send amount NFT image assertion by waiting for resolution.Initializes
NftControllerwith an explicitipfsGateway: 'dweb.link'and updates the init test accordingly, and fixes ERC1155 NFT list rendering to show(0)when balance is missing.Written by Cursor Bugbot for commit a3c533b. This will update automatically on new commits. Configure here.