-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: fetch nfts on components #24547
Conversation
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. |
88a439f
to
5ca4a88
Compare
6afa84e
to
da18690
Compare
Builds ready [0383c5a]
Page Load Metrics (159 ± 228 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
The one thing I've been reproducing is the lack of a loading spinner. I onboard a wallet with NFTs, and I keep the network tab on "slow 3g" to exaggerate the effect. But it goes straight to "No NFTs yet", during both the request to the NFT API and subsequent RPC calls. Do we expect a loading spinner here? Screen.Recording.2024-06-12.at.9.28.49.PM.mov |
Thanks a lot for the QA :D 🙏 Nice one, would you be able to test again? It should be working now 🙏 |
Builds ready [8c85de7]
Page Load Metrics (185 ± 267 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [002f88d]
Page Load Metrics (49 ± 4 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [e45ebc8]
Page Load Metrics (48 ± 3 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I see loading spinners now, and Display NFT media
is enabled when I click allow
Builds ready [7760571]
Page Load Metrics (139 ± 176 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
8840503
to
666362f
Compare
Builds ready [666362f]
Page Load Metrics (187 ± 208 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [666362f]
Page Load Metrics (187 ± 208 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [666362f]
Page Load Metrics (187 ± 208 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
This PR aims to:
1- Enable nft autodetection by default
2- Show a modal only once if the user disables the nft autodetection
3- Make NFT detection tied to the components that use the NFTs instead of the 3mins polling strategy.
This PR goes with this core PR: MetaMask/core#4281
Related issues
Related to: MetaMask/core#4281
Manual testing steps
Test the nft auto detection modal:
not right now
button should close the modal and closing onallow
button should enable the nft auto detection modal.This modal should be seen only once.
Test the removal of the polling in the backgound:
We have the toggle enabled by default now but this should not trigger calls to NFT-API every 3 mins anymore.
Instead the calls should be triggered only when you click on the NFT tab.
(where the old logic should keep detecting your NFTs every 3 mins as long as you have MM open)
Test new notice banner behavior:
Users should see the NFT Notice banner as long as they are on mainnet + they have NFT detection OFF.
Regardless of whether they have NFTs in the state or not.
Clicking on the"Enable NFT autodetection" should remove the notice banner and enable the NFT detection without redirecting the user to settings.
Screenshots/Recordings
Before
Screen.Recording.2024-06-06.at.21.57.21.mov
After
after.mov
Notice banner with toast:
Screen.Recording.2024-06-14.at.13.12.13.mov
Pre-merge author checklist
Pre-merge reviewer checklist