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

Version v11.15.0 remove unecessary pollings when mm closed #24219

Conversation

sahar-fehri
Copy link
Contributor

@sahar-fehri sahar-fehri commented Apr 24, 2024

Cherry picks #24162

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've completed the PR template to the best of my ability
  • 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.

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.

Once nftDetection is enabled by the user, the nftDetection controller
will start polling data in the background every 3 min even if the user
closes the metamask popup or the tab.

We want to stop unnecessary polling when MM is closed in an attempt to
reduce traffic.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/24026?quickstart=1)

Related to: MetaMask/core#4178

1. Go to this page...
2.
3.

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

<!-- [screenshots/recordings] -->

<!-- [screenshots/recordings] -->

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

- [ ] 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.
@sahar-fehri sahar-fehri requested a review from a team as a code owner April 24, 2024 11:32
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.

@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Apr 24, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [f121235]
Page Load Metrics (945 ± 573 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint652941165325
domContentLoaded8207354321
load5132719451194573
domInteractive8207354321
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 238 Bytes (0.01%)
  • ui: 658 Bytes (0.01%)
  • common: 382 Bytes (0.01%)

Copy link

codecov bot commented Apr 24, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 67.53%. Comparing base (5fcacae) to head (f121235).

Files Patch % Lines
app/scripts/metamask-controller.js 33.33% 4 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                  @@
##           Version-v11.15.0   #24219      +/-   ##
====================================================
- Coverage             67.55%   67.53%   -0.02%     
====================================================
  Files                  1247     1247              
  Lines                 48934    48949      +15     
  Branches              12775    12789      +14     
====================================================
+ Hits                  33055    33057       +2     
- Misses                15879    15892      +13     

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

+ // Do not throw error here, supporting Metadata interface is optional even though majority of ERC721 nfts do support it.
+ // This change is made because of instances of NFTs that are ERC404( mixed ERC20 / ERC721 implementation).
+ // As of today, ERC404 is unofficial but some people use it, the contract does not support Metadata interface, but it has the tokenURI() fct.
+ console.error('Contract does not support ERC721 metadata interface.');
Copy link
Contributor

Choose a reason for hiding this comment

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

@sahar-fehri I noticed this was not included in the original PR. Can you explain why it was needed in the cherry-pick?

Copy link
Contributor

Choose a reason for hiding this comment

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

The patch file was created in a previous PR that was already on develop but was not on the release branch yet. We decided to just include both parts of the patch in the release

@danjm danjm merged commit 3d70b1f into Version-v11.15.0 Apr 30, 2024
70 checks passed
@danjm danjm deleted the Version-v11.15.0-remove-unecessary-pollings-when-mm-closed branch April 30, 2024 14:29
@github-actions github-actions bot locked and limited conversation to collaborators Apr 30, 2024
@metamaskbot metamaskbot added the release-11.15.0 Issue or pull request that will be included in release 11.15.0 label May 1, 2024
@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-11.15.0 on PR, as PR was added to branch 11.15.0 when release was cut.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
INVALID-PR-TEMPLATE PR's body doesn't match template release-11.15.0 Issue or pull request that will be included in release 11.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants