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-1): auto detect tokens component #11363

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 AutoDetectToken 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 check for the text "x new tokens found in this account"
  2. Goto the settings page
  3. Click on Advanced Settings
  4. Toggle the "Auto Detect Tokens" to off
  5. Check home screen to see that "x new tokens found in this account" had disappeared
  6. Repeat steps 1-5 to make sure the toggle is working

Screenshots/Recordings

auto_detect_tokens

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 passed on Bitrise! ✅✅✅

Commit hash: 0adb14223264e69b546d2c055dee42f16a3fc0f0 Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/ac4ae001-1a34-46a1-98ec-4215ac93cfbb

[!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
github-actions[bot] commented 1 week ago

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: c2ab6897ac0dab83f5c0a42e85934142d90990fe Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/d6edf2d5-bdca-4e41-8d06-6513c43600c3

[!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
github-actions[bot] commented 1 week ago

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 1942e95d5190701653e131ce1b15ccf140ca681e Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/65dd58da-613b-4741-8f82-e1716a0e9d73

[!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
1 New issue
0 Accepted issues

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

See analysis details on SonarCloud