feat: add AuthenticationController:getUserProfileMetaMetrics new method/action#6068
Merged
mathieuartu merged 3 commits intomainfrom Jul 3, 2025
Merged
Conversation
AuthenticationController:getUserProfileMetaMetrics new method/action
Contributor
Author
|
@metamaskbot publish-preview |
Contributor
|
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions. |
dovydas55
previously approved these changes
Jul 3, 2025
dovydas55
approved these changes
Jul 3, 2025
github-merge-queue bot
pushed a commit
to MetaMask/metamask-extension
that referenced
this pull request
Jul 8, 2025
## **Description** This PR bumps: - `@metamask/profile-sync-controller` to `^20.0.0` Updates from the package changelog since `^18.0.0`: ```md ## [20.0.0] ### Added - Add new `AuthenticationController:getUserProfileMetaMetrics` method ([#6068](MetaMask/core#6068)) - This method fetches data using the Authentication API, returning all MetaMetrics sessions related to the currently authenticated user, in the form of `typeof UserProfileMetaMetrics` ### Changed - **BREAKING:** Bump peer dependency `@metamask/snaps-controllers` from `^12.0.0` to `^14.0.0` ([#6035](MetaMask/core#6035)) - Bump `@metamask/snaps-sdk` from `^7.1.0` to `^9.0.0` ([#6035](MetaMask/core#6035)) - Bump `@metamask/snaps-utils` from `^9.4.0` to `^11.0.0` ([#6035](MetaMask/core#6035)) ## [19.0.0] ### Changed - **BREAKING:** Bump peer dependency `@metamask/accounts-controller` to `^31.0.0` ([#5999](MetaMask/core#5999)) - **BREAKING:** Bump peer dependency `@metamask/network-controller` to `^24.0.0` ([#5999](MetaMask/core#5999)) ``` ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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. --------- Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
github-merge-queue bot
pushed a commit
to MetaMask/metamask-mobile
that referenced
this pull request
Jul 8, 2025
## **Description** This PR bumps: - `@metamask/profile-sync-controller` to `^20.0.0` Updates from the package changelog since `^18.0.0`: ```md ## [20.0.0] ### Added - Add new `AuthenticationController:getUserProfileMetaMetrics` method ([#6068](MetaMask/core#6068)) - This method fetches data using the Authentication API, returning all MetaMetrics sessions related to the currently authenticated user, in the form of `typeof UserProfileMetaMetrics` ### Changed - **BREAKING:** Bump peer dependency `@metamask/snaps-controllers` from `^12.0.0` to `^14.0.0` ([#6035](MetaMask/core#6035)) - Bump `@metamask/snaps-sdk` from `^7.1.0` to `^9.0.0` ([#6035](MetaMask/core#6035)) - Bump `@metamask/snaps-utils` from `^9.4.0` to `^11.0.0` ([#6035](MetaMask/core#6035)) ## [19.0.0] ### Changed - **BREAKING:** Bump peer dependency `@metamask/accounts-controller` to `^31.0.0` ([#5999](MetaMask/core#5999)) - **BREAKING:** Bump peer dependency `@metamask/network-controller` to `^24.0.0` ([#5999](MetaMask/core#5999)) ``` ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] 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). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] 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** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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.
github-merge-queue bot
pushed a commit
to MetaMask/metamask-extension
that referenced
this pull request
Jul 8, 2025
## **Description** This PR bumps: - `@metamask/profile-sync-controller` to `^20.0.0` Updates from the package changelog since `^18.0.0`: ```md ## [20.0.0] ### Added - Add new `AuthenticationController:getUserProfileMetaMetrics` method ([#6068](MetaMask/core#6068)) - This method fetches data using the Authentication API, returning all MetaMetrics sessions related to the currently authenticated user, in the form of `typeof UserProfileMetaMetrics` ### Changed - **BREAKING:** Bump peer dependency `@metamask/snaps-controllers` from `^12.0.0` to `^14.0.0` ([#6035](MetaMask/core#6035)) - Bump `@metamask/snaps-sdk` from `^7.1.0` to `^9.0.0` ([#6035](MetaMask/core#6035)) - Bump `@metamask/snaps-utils` from `^9.4.0` to `^11.0.0` ([#6035](MetaMask/core#6035)) ## [19.0.0] ### Changed - **BREAKING:** Bump peer dependency `@metamask/accounts-controller` to `^31.0.0` ([#5999](MetaMask/core#5999)) - **BREAKING:** Bump peer dependency `@metamask/network-controller` to `^24.0.0` ([#5999](MetaMask/core#5999)) ``` ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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. --------- Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
github-merge-queue bot
pushed a commit
to MetaMask/metamask-mobile
that referenced
this pull request
Jul 8, 2025
## **Description** This PR bumps: - `@metamask/profile-sync-controller` to `^20.0.0` Updates from the package changelog since `^18.0.0`: ```md ## [20.0.0] ### Added - Add new `AuthenticationController:getUserProfileMetaMetrics` method ([#6068](MetaMask/core#6068)) - This method fetches data using the Authentication API, returning all MetaMetrics sessions related to the currently authenticated user, in the form of `typeof UserProfileMetaMetrics` ### Changed - **BREAKING:** Bump peer dependency `@metamask/snaps-controllers` from `^12.0.0` to `^14.0.0` ([#6035](MetaMask/core#6035)) - Bump `@metamask/snaps-sdk` from `^7.1.0` to `^9.0.0` ([#6035](MetaMask/core#6035)) - Bump `@metamask/snaps-utils` from `^9.4.0` to `^11.0.0` ([#6035](MetaMask/core#6035)) ## [19.0.0] ### Changed - **BREAKING:** Bump peer dependency `@metamask/accounts-controller` to `^31.0.0` ([#5999](MetaMask/core#5999)) - **BREAKING:** Bump peer dependency `@metamask/network-controller` to `^24.0.0` ([#5999](MetaMask/core#5999)) ``` ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] 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). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] 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** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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.
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
This PR adds a new
getUserProfileMetaMetricsmethod toAuthenticationController.This methods queries the Authentication API and retrieves the currently authenticated user's metametrics data, in the form of
UserProfileMetaMetricstype.Extension test-drive PR:
The PR above is only a demo, and shouldn't be merged.
It adds a call to
getUserProfileMetaMetricsjust after dispatching account syncing.In order to view the results, switch to the test-drive PR branch,
yarn,yarn start.Then complete onboarding, open the dev tools, network tab, and filter by "authentication".
You should see a
metametricscall every time you refresh the extension page (more convenient to do in full screen mode).References
Will close:
Changelog
Checklist