Skip to content

Conversation

@Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Sep 4, 2025

Explanation

The new metadata properties includeInStateLogs and usedInUi have been added to all controllers maintained by the confirmations team.

References

Relates to #6443

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, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@Gudahtt Gudahtt force-pushed the add-new-metadata-to-confirmation-controllers branch from c288ca6 to ac82fed Compare September 5, 2025 17:07
@Gudahtt Gudahtt marked this pull request as ready for review September 5, 2025 17:12
@Gudahtt Gudahtt requested review from a team as code owners September 5, 2025 17:12
The new metadata properties `includeInStateLogs` and `usedInUi` have
been added to all controllers maintained by the confirmations team.

Relates to #6443
@Gudahtt Gudahtt force-pushed the add-new-metadata-to-confirmation-controllers branch from ac82fed to 5e4b883 Compare September 10, 2025 15:45
const addressBookControllerMetadata = {
addressBook: { persist: true, anonymous: false },
addressBook: {
includeInStateLogs: true,
Copy link
Member

Choose a reason for hiding this comment

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

Minor, very pedantic, but how are deciding the order of these properties if we're defining them in every controller? Alphabetical? Importance?

Copy link
Member Author

Choose a reason for hiding this comment

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

I have been putting them in alphabetical order, leaving the order of pre-existing properties alone to minimize churn. I intended to move anonymous to be alphabetical as part of the rename

includeInStateLogs: true,
persist: true,
anonymous: false,
usedInUi: true,
Copy link
Member

@matthewwalsh0 matthewwalsh0 Sep 10, 2025

Choose a reason for hiding this comment

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

Minor, will this be used to filter the background RPC patches sent to the UI in extension?

Will it exclude properties from the Redux store in mobile?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, that's the idea! We won't start using it to filter in practice without another round of review though, so we'll have an opportunity to catch mistakes still.

Initially the plan is just to filter the UI state in extension. The mobile Redux store is also used for persistence, so we can't really do it there. But there is work underway to change that. After the storage changes on mobile, I hope we can filter the UI Redux state using this value on mobile as well.

addressBook: {
includeInStateLogs: true,
persist: true,
anonymous: false,
Copy link
Member

Choose a reason for hiding this comment

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

Did we plan to rename this to includeInDebugLogs, is that a future PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes exactly, it will happen as part of the migration to base-controller/next, tracked here: #5626

@Gudahtt Gudahtt merged commit cb132de into main Sep 10, 2025
239 checks passed
@Gudahtt Gudahtt deleted the add-new-metadata-to-confirmation-controllers branch September 10, 2025 16:15
jeffsmale90 added a commit that referenced this pull request Sep 24, 2025
## Explanation

Releases @metamask/signature-controller@34.0.0

### Added

- Add two new controller state metadata properties: `includeInStateLogs`
and `usedInUi` ([#6473](#6473))
- **BREAKING:** Decode delegation permissions using
`@metamask/gator-permissions-controller` when calling
`newUnsignedTypedMessage`, adds `@metamask/gator-permissions-controller`
as a peer dependency.
([#6619](#6619))

### Changed

- Bump `@metamask/controller-utils` from `^11.12.0` to `^11.14.0`
([#6620](#6620),
[#6629](#6629))
- Bump `@metamask/base-controller` from `^8.1.0` to `^8.4.0`
([#6355](#6355),
[#6465](#6465),
[#6632](#6632))
- Bump `@metamask/utils` from `^11.4.2` to `^11.8.0`
([#6588](#6588))
- Bump `@metamask/network-controller` from `^24.1.0` to `^24.2.0`
([#6678](#6678))
- Bump `@metamask/keyring-controller` from `^23.0.0` to `^23.1.0`
([#6590](#6590))
- Bump `@metamask/accounts-controller` from `^33.0.0` to `^33.1.0`
([#6572](#6572))
github-merge-queue bot pushed a commit to MetaMask/metamask-mobile that referenced this pull request Oct 21, 2025
## **Description**

Updates the dependency on @metamask/signature-controller to 34.0.0

This version bump introduces a dependency on
@metamask/gator-permissions-controller via
`GatorPermissionsControllerDecodePermissionFromPermissionContextForOriginAction`
which has been added to signature-controller-messenger.

## **Changelog**

From SignatureController
https://github.com/MetaMask/core/blob/main/packages/signature-controller/CHANGELOG.md:

### @metamask/signature-controller 34.0.0

#### Added

- Add two new controller state metadata properties: includeInStateLogs
and usedInUi (MetaMask/core#6473)
- Decode delegation permissions using
`@metamask/gator-permissions-controller` when calling
`newUnsignedTypedMessage`
([#6619](MetaMask/core#6619))

#### Changed

- Bump @metamask/controller-utils from ^11.12.0 to ^11.14.0
(MetaMask/core#6620,
MetaMask/core#6629)
- Bump @metamask/base-controller from ^8.1.0 to ^8.4.0
(MetaMask/core#6355,
MetaMask/core#6465,
MetaMask/core#6632)
- Bump @metamask/utils from ^11.4.2 to ^11.8.0
(MetaMask/core#6588)

### @metamask/signature-controller 33.0.0

#### Changed

- BREAKING: Bump peer dependency @metamask/accounts-controller from
^32.0.0 to ^33.0.0 (MetaMask/core#6345)
- BREAKING: Bump peer dependency @metamask/keyring-controller from
^22.0.0 to ^23.0.0 (MetaMask/core#6345)
- Bump @metamask/base-controller from ^8.0.1 to ^8.1.0
(MetaMask/core#6284)
- Bump @metamask/controller-utils from ^11.11.0 to ^11.12.0
(MetaMask/core#6303)

CHANGELOG entry: null

## **Screenshots/Recordings**

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Upgrade @metamask/signature-controller to ^34 and allow
GatorPermissionsController decode action in the signature controller
messenger.
> 
> - **Dependencies**:
>   - Bump `@metamask/signature-controller` to `^34.0.0`.
> - **Engine**:
> -
**`app/core/Engine/messengers/signature-controller-messenger/signature-controller-messenger.ts`**:
> - Add
`GatorPermissionsControllerDecodePermissionFromPermissionContextForOriginAction`
and allow
`GatorPermissionsController:decodePermissionFromPermissionContextForOrigin`
in `allowedActions`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
657705e. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants