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: Don't show third party notice for preinstalled Snaps #27365

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Sep 24, 2024

This cherry-picks commit 5cc14af into release 12.3.0.

Open in GitHub Codespaces

Pre-merge author checklist

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.

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

We show a third party notice when installing or connecting to a Snap for
the first time. Preinstalled Snaps are first party Snaps however, so we
don't need to show the warning for these Snaps. I've implemented some
logic that checks if the requested Snap is a preinstalled Snap, and only
show the third party notice if it's not.

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

Fixes: MetaMask/MetaMask-planning#3325.

Assuming you have not accepted the third party notice before:

1. Go to [the Test Snaps
page](https://metamask.github.io/snaps/test-snaps/latest/)
2. Connect to the preinstalled Snap, and verify the notice is _not_
shown
3. Connect to any other Snap, and verify that the notice _is_ shown

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] 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.
@Mrtenz Mrtenz requested review from a team as code owners September 24, 2024 14:20
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Sep 24, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [b030733]
Page Load Metrics (1809 ± 112 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint31924561685480230
domContentLoaded15532232177218589
load156425371809233112
domInteractive227236147

Copy link

codecov bot commented Sep 24, 2024

Codecov Report

Attention: Patch coverage is 16.66667% with 5 lines in your changes missing coverage. Please review.

Project coverage is 70.13%. Comparing base (439f7d6) to head (b030733).
Report is 21 commits behind head on Version-v12.3.0.

Files with missing lines Patch % Lines
ui/selectors/selectors.js 16.67% 5 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           Version-v12.3.0   #27365      +/-   ##
===================================================
- Coverage            70.24%   70.13%   -0.11%     
===================================================
  Files                 1426     1432       +6     
  Lines                50239    50441     +202     
  Branches             13954    13993      +39     
===================================================
+ Hits                 35289    35375      +86     
- Misses               14950    15066     +116     

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

@danjm danjm merged commit 24f9828 into Version-v12.3.0 Sep 24, 2024
75 of 76 checks passed
@danjm danjm deleted the mrtenz/cherry-pick-5cc14af branch September 24, 2024 18:33
@github-actions github-actions bot locked and limited conversation to collaborators Sep 24, 2024
@metamaskbot metamaskbot added the release-12.3.0 Issue or pull request that will be included in release 12.3.0 label Sep 26, 2024
@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-12.3.0 on PR, as PR was added to branch 12.3.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-12.3.0 Issue or pull request that will be included in release 12.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants