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

[FLASK] Fix eth_accounts permission for Snaps #16158

Closed
wants to merge 3 commits into from

Conversation

FrederikBolding
Copy link
Member

@FrederikBolding FrederikBolding commented Oct 11, 2022

Explanation

This PR fixes an issue with installing snaps that request eth_accounts.

To create the eth_accounts permission, we need the selected accounts from the UI, these are normally passed back in the result of the approval (see https://github.com/MetaMask/metamask-extension/blob/develop/ui/components/app/permission-page-container/permission-page-container.component.js#L90-L109).

With this PR we make that appropriate change and patch the SnapController to support this return value properly.

Manual Testing Steps

  1. Create a template snap that uses eth_accounts
  2. Install it and see that it successfully installs
  3. Try develop and see that it fails to install there

@FrederikBolding FrederikBolding marked this pull request as ready for review October 11, 2022 10:07
@FrederikBolding FrederikBolding requested a review from a team as a code owner October 11, 2022 10:07
@metamaskbot
Copy link
Collaborator

Builds ready [50dce11]
Page Load Metrics (2339 ± 74 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint96163113168
domContentLoaded19362777232216780
load20272777233915374
domInteractive19362777232216780

@metamaskbot
Copy link
Collaborator

Builds ready [de51497]
Page Load Metrics (2495 ± 142 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint952751283818
domContentLoaded182831152473291140
load195132112495295142
domInteractive182831152473291140

@FrederikBolding
Copy link
Member Author

Closing in favor of #16161

@github-actions github-actions bot locked and limited conversation to collaborators Oct 11, 2022
@FrederikBolding FrederikBolding deleted the fb/fix-eth-accounts-for-snaps branch June 11, 2024 10:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants