Add status to PermissionInfoWithMetadata#8445
Merged
jeffsmale90 merged 2 commits intomainfrom Apr 15, 2026
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 46e2976. Configure here.
1517a54 to
01ee3ff
Compare
PermissionInfoWithMetadata
3a6cd2f to
d6f7efa
Compare
7 tasks
1cc98dd to
7af006f
Compare
- if revocationMetadata exists, or revoked onchain - 'Revoked' - if expiration after onchain block timestamp 'Expired' - otherwise 'Active'
- changelog entry - readme change referencing the dependency from permissions controller to network controller
7af006f to
ce97078
Compare
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Apr 16, 2026
## Explanation Releases - @metamask/gator-permissions-controller@4.0.0 - @metamask/signature-controller@39.2.0 Breaking change to @metamask-gator-permissions-controller: >- **BREAKING:** Add `status` to `PermissionInfoWithMetadata` type, resolved from onchain data ([#8445](#8445)) ## References <!-- Are there any issues that this pull request is tied to? Are there other links that reviewers should consult to understand these changes better? Are there client or consumer pull requests to adopt any breaking changes? For example: * Fixes #12345 * Related to #67890 --> ## Checklist - [ ] I've updated the test suite for new or updated code as appropriate - [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [ ] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md) - [ ] I've introduced [breaking changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md) in this PR and have prepared draft pull requests for clients and consumer packages to resolve them <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Primarily a version/dependency release PR, but it propagates a breaking type change (`PermissionInfoWithMetadata.status`) via a major bump that can break downstream TypeScript consumers. > > **Overview** > Cuts the `918.0.0` release by bumping the root monorepo version and publishing `@metamask/gator-permissions-controller` `4.0.0` (noted as **BREAKING** due to adding a `status` field to `PermissionInfoWithMetadata`, resolved from on-chain data). > > Updates the dependency chain to consume the new major: `@metamask/signature-controller` is released as `39.2.0` and now depends on `@metamask/gator-permissions-controller@^4.0.0`, and `@metamask/shield-controller` updates to `@metamask/signature-controller@^39.2.0`; lockfile and changelogs are updated accordingly. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 0371831. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: MJ Kiwi <me@mj.kiwi>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Explanation
Gator permissions loaded from storage may be either active, revoked, or expired - this is in addition to the "Revoked" metadata stored with the permission.
With this change, after loading the permissions we resolve the status for each item. While the status is being resolved, we show the previous status held in storage for this item.
Note: this requires a migration.
When resolving the status:
Mocked up UI in Extension:
References
Checklist
Note
Medium Risk
Adds a new persisted
statusfield and introduces on-chain RPC reads viaNetworkControllerduring permission sync, which could affect performance and correctness across chains if provider/contract data is misconfigured.Overview
Adds lifecycle status to gator granted permissions.
PermissionInfoWithMetadatanow includes astatus(Active/Revoked/Expired) and this type is exported for consumers.Sync now resolves status from chain state after fetching from the snap. After the snap returns granted permissions, the controller temporarily keeps the previous stored status (defaulting to
Activefor migrated rows) and then calls newpermissionOnChainStatushelpers to: treatrevocationMetadataorDelegationManager.disabledDelegationsasRevoked, useTimestampEnforcercaveats plus latest block timestamp forExpired, otherwiseActive.Integration surface expands.
GatorPermissionsControllernow depends onNetworkControlleractions to obtain a chain provider, and the package adds@metamask/network-controllerand@metamask/abi-utilsdependencies; tests were updated and new unit tests were added for the on-chain status resolver.Reviewed by Cursor Bugbot for commit ce97078. Bugbot is set up for automated code reviews on this repo. Configure here.