-
-
Notifications
You must be signed in to change notification settings - Fork 261
feat: Add new metadata to confirmation controllers #6473
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
Conversation
c288ca6 to
ac82fed
Compare
The new metadata properties `includeInStateLogs` and `usedInUi` have been added to all controllers maintained by the confirmations team. Relates to #6443
ac82fed to
5e4b883
Compare
| const addressBookControllerMetadata = { | ||
| addressBook: { persist: true, anonymous: false }, | ||
| addressBook: { | ||
| includeInStateLogs: true, |
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.
Minor, very pedantic, but how are deciding the order of these properties if we're defining them in every controller? Alphabetical? Importance?
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.
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, |
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.
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?
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.
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, |
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.
Did we plan to rename this to includeInDebugLogs, is that a future PR?
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.
Yes exactly, it will happen as part of the migration to base-controller/next, tracked here: #5626
## 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))
## **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 -->
Explanation
The new metadata properties
includeInStateLogsandusedInUihave been added to all controllers maintained by the confirmations team.References
Relates to #6443
Checklist