Skip to content
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

fix: nft detection running too many times #8603

Merged
merged 3 commits into from
Apr 4, 2024

Conversation

bergeron
Copy link
Contributor

@bergeron bergeron commented Feb 16, 2024

Description

Porting this core PR to mobile.

Related issues

Fixes an issue where the NFT detection controller was running too many times. It would send an HTTP request to fetch NFTs when any setting changed. It should only do so when the autodetect NFT setting changes.

Manual testing steps

  1. Open account with NFTs on mainnet
  2. Verify they're still autodetected when the setting is on

Screenshots/Recordings

Before

Screen.Recording.2024-02-15.at.10.22.54.PM.mov

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

@bergeron bergeron requested a review from a team as a code owner February 16, 2024 06:38
Copy link
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.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (23dc52b) 41.06% compared to head (2a78be1) 41.06%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8603   +/-   ##
=======================================
  Coverage   41.06%   41.06%           
=======================================
  Files        1247     1247           
  Lines       30351    30351           
  Branches     2963     2963           
=======================================
  Hits        12464    12464           
  Misses      17142    17142           
  Partials      745      745           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

sonarcloud bot commented Feb 16, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@bergeron
Copy link
Contributor Author

bergeron commented Apr 1, 2024

Still needed, will do after #9110

@bergeron bergeron requested a review from a team as a code owner April 2, 2024 16:41
Copy link

sonarcloud bot commented Apr 2, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Contributor

@NicolasMassart NicolasMassart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
Tested using Flipper network log. OS request only happen when switching this specific setting on.

@NicolasMassart NicolasMassart added needs-qa Any New Features that needs a full manual QA prior to being added to a release. Run Smoke E2E Triggers smoke e2e on Bitrise labels Apr 4, 2024
Copy link
Contributor

github-actions bot commented Apr 4, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: ca5870e
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/1f645a54-c79c-40da-bdd8-7224404bcf5b

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

@bergeron bergeron merged commit d1d5c00 into main Apr 4, 2024
43 of 45 checks passed
@bergeron bergeron deleted the brian/nft-detection-controller-too-many-calls branch April 4, 2024 15:21
@github-actions github-actions bot removed the needs-qa Any New Features that needs a full manual QA prior to being added to a release. label Apr 4, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Run Smoke E2E Triggers smoke e2e on Bitrise team-assets
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants