Skip to content

Conversation

@FrederikBolding
Copy link
Member

Description

Removes a bunch of outdated logic from the permissions page that is not in use anymore.

We previously stored the requested permissions alongside a boolean of whether they should be granted, but the option to toggle that boolean was removed years ago. This PR replaces that logic with deriving the requested permissions from the props without storing them in state. This also simplifies later iterations where the permission values (not just the keys) are needed to render the permissions.

Manual testing steps

  1. Go to the test-dapp
  2. Connect to the test-dapp
  3. See that it still works

@FrederikBolding FrederikBolding added the team-snaps-deprecated DEPRECATED: please use "team-core-platform" instead label Feb 7, 2024
@FrederikBolding FrederikBolding requested a review from a team as a code owner February 7, 2024 12:51
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Feb 7, 2024
@codecov
Copy link

codecov bot commented Feb 7, 2024

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (4067f6f) 68.42% compared to head (a308cae) 68.43%.
Report is 15 commits behind head on develop.

Files Patch % Lines
...e-container/permission-page-container.component.js 0.00% 9 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #22850      +/-   ##
===========================================
+ Coverage    68.42%   68.43%   +0.01%     
===========================================
  Files         1089     1089              
  Lines        42908    42901       -7     
  Branches     11414    11411       -3     
===========================================
  Hits         29357    29357              
+ Misses       13551    13544       -7     

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

@metamaskbot
Copy link
Collaborator

Builds ready [a308cae]
Page Load Metrics (711 ± 12 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint7712792126
domContentLoaded8411573
load6677487112512
domInteractive8411563
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: -508 Bytes (-0.01%)
  • common: 0 Bytes (0.00%)

Copy link
Contributor

@hmalik88 hmalik88 left a comment

Choose a reason for hiding this comment

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

LGTM

@FrederikBolding FrederikBolding merged commit 642f6d4 into develop Feb 7, 2024
@FrederikBolding FrederikBolding deleted the fb/simplify-permissions-page branch February 7, 2024 17:30
@github-actions github-actions bot locked and limited conversation to collaborators Feb 7, 2024
@metamaskbot metamaskbot added the release-11.11.0 Issue or pull request that will be included in release 11.11.0 label Feb 7, 2024
@ziedbrini ziedbrini added team-snaps-platform-deprecated DEPRECATED: please use "team-core-platform" instead (or "team-new-networks" for Solana snap issues) and removed team-snaps-deprecated DEPRECATED: please use "team-core-platform" instead labels Mar 6, 2024
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.11.0 Issue or pull request that will be included in release 11.11.0 team-snaps-platform-deprecated DEPRECATED: please use "team-core-platform" instead (or "team-new-networks" for Solana snap issues)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants