Skip to content

fix: filter NFTs on send flow#31850

Merged
gambinish merged 4 commits into
mainfrom
fix/filter-nfts-on-send-flow
Apr 10, 2025
Merged

fix: filter NFTs on send flow#31850
gambinish merged 4 commits into
mainfrom
fix/filter-nfts-on-send-flow

Conversation

@sahar-fehri

@sahar-fehri sahar-fehri commented Apr 10, 2025

Copy link
Copy Markdown
Contributor

Description

Fixes a bug introduced into 12.16.0 RC

Bug was that users could enter into a state where they could send NFTs on a different network than they belonged on. This is because we are now showing NFTs across all chains that a user has NFTs on, rather than the constrained to the GNS currentChain.

Users could enter into NFT send flow in two ways:

  1. Via the NFT detail screen. We proactively change the network on the users behalf if they enter the send flow this way (press Send from the detail screen of a NFT from a different chain)

  2. Via the Send button on the main NFT Grid view. This is where the bug was caught. When entering into the send flow in this way, users could enter into a state where they could accidentally send an NFT on a different chain than intended.

View recording below to visualize this difference.

This fix filters out NFTs in the second flow so that they only ever show NFTs from the globally selected chain.

Open in GitHub Codespaces

Related issues

Fixes: #31858

Manual testing steps

  1. Add account with NFTs on a network
  2. Enter into Send flow as specified in flow 2
  3. NFTs should only be listed on network that they are on.

Screenshots/Recordings

Before

Screen.Recording.2025-04-10.at.12.03.58.PM.mov

After

Screen.Recording.2025-04-10.at.3.17.56.PM.mov

Pre-merge author checklist

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.

@github-actions

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot

metamaskbot commented Apr 10, 2025

Copy link
Copy Markdown
Collaborator

✨ Files requiring CODEOWNER review ✨

🖥️ @MetaMask/wallet-ux

  • ui/components/multichain/asset-picker-amount/asset-picker-modal/asset-picker-modal-nft-tab.test.tsx
  • ui/components/multichain/asset-picker-amount/asset-picker-modal/asset-picker-modal-nft-tab.tsx

@metamaskbot

Copy link
Copy Markdown
Collaborator
Builds ready [469813d]
UI Startup Metrics (1255 ± 58 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1255113514085812951366
load10919651260581140965
domContentLoaded10859581255581134982
domInteractive18145161732
firstPaint717821264432252325
backgroundConnect7424289
firstReactRender22155782242
getState15537879
initialActions001001
loadScripts836708100456868927
setupStore8520378
WebpackHomeuiStartup22211768276719123252592
load17521362229017418222114
domContentLoaded17421358228716918192075
domInteractive181270131452
firstPaint163636117325683
backgroundConnect3310252333575
firstReactRender188533561165983
getState1843103158
initialActions317145
loadScripts17371356228516518172047
setupStore32626956489
FirefoxBrowserifyHomeuiStartup13431168176611614201522
load12051025164811612691399
domContentLoaded12051025164811612691399
domInteractive10337271399099
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2212119152146
firstReactRender22195252130
getState1032022078
initialActions0028301
loadScripts11861012163811512501374
setupStore5417267
WebpackHomeuiStartup15091331193912315601763
load13041144168611513521532
domContentLoaded13041144168611513521531
domInteractive9565368338995
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect21147782238
firstReactRender34294943644
getState8431589
initialActions002111
loadScripts12861127166711513391515
setupStore8530478

@gambinish gambinish marked this pull request as ready for review April 10, 2025 22:20
@gambinish gambinish requested a review from a team as a code owner April 10, 2025 22:20
@gambinish gambinish added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Apr 10, 2025
@metamaskbot

Copy link
Copy Markdown
Collaborator
Builds ready [522d047]
UI Startup Metrics (1138 ± 58 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1138103113685811731235
load996908121252966993
domContentLoaded991904120552964995
domInteractive16125461527
firstPaint6801221130389936989
backgroundConnect6324378
firstReactRender18144141928
getState13446878
initialActions001001
loadScripts76468095750793855
setupStore7514278
WebpackHomeuiStartup21911796264617223072428
load17211388213914017912014
domContentLoaded17141383208813817822009
domInteractive181267121457
firstPaint162673435825394
backgroundConnect30935836359
firstReactRender183554201136390
getState1842663279
initialActions318136
loadScripts17091381204913317791980
setupStore24633040369
FirefoxBrowserifyHomeuiStartup13731169167811114511586
load12251021149610413051412
domContentLoaded12251021149610413051412
domInteractive10138233319099
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect20125172034
firstReactRender24196882444
getState942152179
initialActions002001
loadScripts12081011148610412801397
setupStore6437568
WebpackHomeuiStartup1515135418369915901711
load1307116615629113781470
domContentLoaded1307116515619113771470
domInteractive9466327278997
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect221478102240
firstReactRender34295153647
getState9431679
initialActions102111
loadScripts1288115115409113591452
setupStore8528489

@gambinish gambinish added this pull request to the merge queue Apr 10, 2025
Merged via the queue into main with commit 94cf635 Apr 10, 2025
@gambinish gambinish deleted the fix/filter-nfts-on-send-flow branch April 10, 2025 23:31
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 10, 2025
@metamaskbot metamaskbot added the release-12.18.0 Issue or pull request that will be included in release 12.18.0 label Apr 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-12.18.0 Issue or pull request that will be included in release 12.18.0 team-assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: NFTs can enter into Send flow for Network they do not belong to

4 participants