Repository navigation
fix(wallet): fall back to options.analyticsId when persisted id is empty - #11025
Merged
Merged
Conversation
Null, undefined, or empty persisted analyticsId must not overwrite the client-supplied option, or first-run / fixture state crashes wallet init. Co-authored-by: Cursor <cursoragent@cursor.com>
gauthierpetetin
temporarily deployed
to
default-branch
October 23, 2026 06:19 — with
GitHub Actions
Inactive
Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
Current version of PR was reviewed by /review-bugbot on Oct 23, 08:12 GMT+2. It flagged 0 findings. Bugbot on commit |
Co-authored-by: Cursor <cursoragent@cursor.com>
Mrtenz
reviewed
Oct 23, 2026
Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>
Mrtenz
approved these changes
Oct 23, 2026
Merged
1 of 4 tasks
SnowingFox
pushed a commit
to SnowingFox/core-1
that referenced
this pull request
Oct 24, 2026
## Explanation Minor release of `@metamask/wallet` (`19.0.0` → `19.1.0`). - Add support for Node.js 26. ([MetaMask#10981](MetaMask#10981)) - Fall back to `options.analyticsId` when persisted `analyticsId` is null, undefined, or empty. ([MetaMask#11025](MetaMask#11025)) ## References - [MetaMask#10981](MetaMask#10981) - [MetaMask#11025](MetaMask#11025) ## 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 - [x] 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] > **Low Risk** > Version and changelog-only release; included analytics ID fallback is a narrow initialization fix and Node 26 is an engines declaration update. > > **Overview** > **Release monorepo `1360.0.0` and publish `@metamask/wallet` `19.1.0`.** The diff is version bumps in the root `package.json` and `packages/wallet/package.json`, plus changelog housekeeping for the wallet package. > > The **19.1.0** notes (moved out of `[Unreleased]`) cover two already-merged changes: **Node.js 26** support in the package engines matrix, and a fix so wallet `AnalyticsController` initialization uses **`options.analyticsId`** when persisted state has a null, undefined, or empty `analyticsId` (non-empty persisted values still win). > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 8d14cef. 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: Cursor <cursoragent@cursor.com>
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
AnalyticsControllerinit merged state as{ analyticsId: options.analyticsId, ...state }, so a persistedanalyticsId: null(common in first-run / extension fixtures) overwrote the client-supplied UUID and crashed withInvalid analyticsId.This change prefers a non-empty persisted
analyticsId, and otherwise usesoptions.analyticsId.References
Checklist
Note
Low Risk
Targeted analytics init bugfix with no auth or payment impact; behavior change only when persisted analytics id is empty.
Overview
Fixes wallet
AnalyticsControllerinitialization so first-run or fixture persisted state withanalyticsIdset tonull,undefined, or''no longer overwrites the client-supplied UUID and triggersInvalid analyticsId.Init now resolves the id explicitly: only a non-empty persisted string wins; otherwise it uses
options.analyticsId. Tests cover the empty persisted cases, and changelog/JSDoc describe the new override rules.Reviewed by Cursor Bugbot for commit c64d14a. Bugbot is set up for automated code reviews on this repo. Configure here.