-
Notifications
You must be signed in to change notification settings - Fork 5k
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: fix permissions not correctly being updated when all network clients are removed for a chainId #29855
fix: fix permissions not correctly being updated when all network clients are removed for a chainId #29855
Conversation
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. |
Builds ready [a535556]
Page Load Metrics (1595 ± 71 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Builds ready [0928320]
Page Load Metrics (1706 ± 95 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 chainId
s from removed networks already in permission state.
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_getPermissions
shows the chainId in theendowment:permitted-chains
permissionwallet_getPermissions
shows the chainId in theendowment:permitted-chains
permissionwallet_getPermissions
shows that the chainId is no longer in theendowment:permitted-chains
permissionScreenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist