Conversation
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. |
Collaborator
Builds ready [a535556]
Page Load Metrics (1595 ± 71 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Collaborator
Builds ready [0928320]
Page Load Metrics (1706 ± 95 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Gudahtt
approved these changes
Jan 23, 2025
Member
Gudahtt
left a comment
There was a problem hiding this comment.
LGTM! Won't we also need a migration to fully resolve this bug though? Certainly we can do it in a separate PR, but I would expect there to be chainIds from removed networks already in permission state.
|
@jiexi it seems we have the same issue on Mobile. Beyond the controller fix, do you think there needs to be a fix similar to this one on Mobile? MetaMask/metamask-mobile#12684 cc @sleepytanya |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes a bug where permissions are not being updated when all network clients for a chainId are removed. This results in permittedChains permissions referencing chainIds that are no longer supported and makes it so that the existing permittedChains permissions cannot be modified in any way until either the permission is revoked entirely or the missing network is readded.
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/3735
Requires: MetaMask/core#5183
Manual testing steps
wallet_getPermissionsshows the chainId in theendowment:permitted-chainspermissionwallet_getPermissionsshows the chainId in theendowment:permitted-chainspermissionwallet_getPermissionsshows that the chainId is no longer in theendowment:permitted-chainspermissionScreenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist