Skip to content

[pull] main from MetaMask:main#637

Merged
pull[bot] merged 3 commits intoReality2byte:mainfrom
MetaMask:main
Mar 27, 2026
Merged

[pull] main from MetaMask:main#637
pull[bot] merged 3 commits intoReality2byte:mainfrom
MetaMask:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Mar 27, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

NicolasMassart and others added 3 commits March 27, 2026 17:36
…cs to useAnalytics (#27985)

---

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

Replaces the deprecated `useMetrics` hook with the new `useAnalytics`
hook in `useGoToPortfolioBridge.ts`.

This is part of the broader C3 analytics migration (#26686) that
standardises all analytics calls across the mobile app to use the new
`useAnalytics` abstraction instead of `useMetrics`. The hook interface
is identical (`trackEvent`, `createEventBuilder`), so no behaviour
changes.

## **Changelog**

CHANGELOG entry: null

## **Related issues**

Refs: #26814

## **Manual testing steps**

N/A

## **Screenshots/Recordings**

### **Before**

N/A

### **After**

N/A

## **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**

- [ ] 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.

<!-- Generated with the help of the pr-description AI skill -->

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: swaps analytics hook wiring and adds legacy `action`/`name`
properties to the emitted event, without changing navigation or
URL-building logic.
> 
> **Overview**
> Updates `useGoToPortfolioBridge` to use the new `useAnalytics` hook
instead of deprecated `useMetrics` for `BRIDGE_LINK_CLICKED` tracking.
> 
> Also explicitly adds legacy `action` and `name` properties to the
tracked event payload to preserve existing analytics fields during the
migration.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
4b45bf0. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
… useAnalytics (#27983)

---

## **Description**

<!-- 
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

Replaces the deprecated `useMetrics` hook with the new `useAnalytics`
hook in `TabBar.tsx`.

This is part of the broader C3 analytics migration (#26686) that
standardises all analytics calls across the mobile app to use the new
`useAnalytics` abstraction instead of `useMetrics`. The hook interface
is identical (`trackEvent`, `createEventBuilder`), so no behaviour
changes.

## **Changelog**

CHANGELOG entry: null

## **Related issues**

Refs: #26814

## **Manual testing steps**

N/A

## **Screenshots/Recordings**

### **Before**

N/A

### **After**

N/A

## **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**

- [ ] 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.

<!-- Generated with the help of the pr-description AI skill -->

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk refactor that swaps a deprecated analytics hook for its
replacement while keeping the same `trackEvent`/`createEventBuilder`
interface; main risk is accidental import/path or hook wiring issues
affecting event emission.
> 
> **Overview**
> Updates `TabBar.tsx` to use the new `useAnalytics` hook instead of the
deprecated `useMetrics`, leaving the existing
`trackEvent`/`createEventBuilder` usage intact (e.g., for the wallet
actions button click event).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
c31f62f. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

Recently we released `@metamask/messenger` 1.0.0, and we upgraded all
core packages to use this version. Unfortunately, this makes it
impossible to bump a single core package in this repo. Doing so means
that there are two versions of this package in the dependency tree in
use at the same time, and this results in a type error, since the
`Messenger` type from 1.0.0 is incompatible with the `Messenger` type
from previous versions due to the use of private fields (see
<microsoft/TypeScript#62486> and other
TypeScript issues).

To truly fix this, we would have to upgrade all core packages. This is
non-trivial, so to unblock teams we force-resolve `@metamask/messenger`
to 1.0.0 across the dependency tree. This should be safe as there are no
breaking changes in 1.0.0 (this release was just a formality to
communicate that the package is now stable).

## **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: null

## **Related issues**

(N/A)

## **Manual testing steps**

Should be already covered by CI, but just in case, try upgrading a core
package. `yarn lint:tsc` should still pass.

## **Screenshots/Recordings**

(N/A)

### **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
- [ ] 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]
> **Low Risk**
> Low risk dependency-resolution change; main risk is unforeseen
runtime/type incompatibilities if any transitive dependency relied on
`@metamask/messenger@0.x` behavior.
> 
> **Overview**
> Forces the dependency tree to use `@metamask/messenger@^1.0.0` by
adding a Yarn `resolutions` override, preventing multiple
`@metamask/messenger` versions from being installed simultaneously.
> 
> Updates the direct dependency and lockfile to
`@metamask/messenger@1.0.0`, removing the locked `0.3.0` entry.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
c6b17de. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@pull pull Bot locked and limited conversation to collaborators Mar 27, 2026
@pull pull Bot added the ⤵️ pull label Mar 27, 2026
@pull pull Bot merged commit e2bb36a into Reality2byte:main Mar 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants