MetaMask / metamask-mobile

Mobile web browser providing access to websites that use the Ethereum blockchain
https://metamask.io
Other
2.14k stars 1.1k forks source link

refactor(1702-2): auto detect nft component #11364

Closed vinnyhoward closed 1 week ago

vinnyhoward commented 1 week ago

Description

This PR is part of a series that breaks down the original large PR #11127 into smaller, more manageable chunks.

The AutoDetectNFTSettings functionality is valuable beyond its original implementation. By converting it into a reusable component, we can:

  1. Improve code maintainability
  2. Reduce duplication
  3. Enhance consistency across the application and ease of use

Changes

Impact

This refactored component will be used in:

Related issues

Feature: #1702

Manual testing steps

  1. On the wallet home screen, click on the NFTs tab and make sure they are there (use account with NFTs)
  2. Goto the settings page
  3. Click on Security Settings
  4. Scroll down to Toggle the "Autodetect NFTs" and toggle to off
  5. Check home screen under the NFT tab to make sure the enable Autodetect NFT banner is visible
  6. Go back and toggle it back to on
  7. Go back to the home screen wallet under NFT tabs. Make sure the banner is off

Screenshots/Recordings

Scenario 1 Scenario 2
1 2

Before

NA

After

NA

Pre-merge author checklist

Pre-merge reviewer checklist

github-actions[bot] commented 1 week ago

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.

github-actions[bot] commented 1 week ago

https://bitrise.io/ Bitrise

🔄🔄🔄 pr_smoke_e2e_pipeline started on Bitrise...🔄🔄🔄

Commit hash: 2681a9b5165e2a8b55d8dcf121b09711d31c0605 Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/2576f542-e407-4a81-9a3a-862bbf74b917

[!NOTE]

  • This comment will auto-update when build completes
  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request
github-actions[bot] commented 1 week ago

https://bitrise.io/ Bitrise

🔄🔄🔄 pr_smoke_e2e_pipeline started on Bitrise...🔄🔄🔄

Commit hash: 89ccef22466d77e2be8db7b3855c578f8a0bab27 Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/6416b678-9d2c-43f6-90c1-3bbadaa6cacd

[!NOTE]

  • This comment will auto-update when build completes
  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request
github-actions[bot] commented 1 week ago

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: aa3535a3e16f9da085ed481d9d52773883c6a514 Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/8158c7c8-4e29-4c7b-b5bf-7fe297fb8f03

[!NOTE]

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request
sonarcloud[bot] commented 1 week ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud