refactor(multichain-account-service)!: move MultichainAccount{Wallet,Group} implementations#6216
Merged
Merged
Conversation
ccharly
force-pushed
the
feat/move-multichain-account-impl
branch
from
July 30, 2025 21:31
f21eb46 to
05b4aa6
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
ccharly
marked this pull request as ready for review
July 31, 2025 11:13
ccharly
enabled auto-merge (squash)
July 31, 2025 12:29
| entropySource: EntropySourceId, | ||
| ): MultichainAccountWalletId { | ||
| return `${AccountWalletType.Entropy}:${entropySource}`; | ||
| } |
There was a problem hiding this comment.
Bug: Inconsistent Function Import Causes Divergent Behavior
The toMultichainAccountWalletId function is redefined locally in MultichainAccountWallet.ts but is also imported from @metamask/account-api in other files (e.g., MultichainAccountService.ts, AccountTreeController.test.ts, MultichainAccountWallet.test.ts). This import inconsistency can lead to different implementations being used across the codebase, potentially causing divergent behavior and runtime issues. As part of the refactoring, all consumers should import toMultichainAccountWalletId from the local MultichainAccountWallet module.
Locations (2)
Merged
4 tasks
ccharly
added a commit
that referenced
this pull request
Jul 31, 2025
…ultichainAccountWalletId` (#6219) ## Explanation Just an oversight of this PR ([found by Cursor](#6216 (comment))): - #6216 ## References N/A ## Changelog N/A ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] 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](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs), highlighting breaking changes as necessary - [ ] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes
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
Moving the implementations out of
@metamask/account-apito have them closer to the service (which makes more sense too).Beware,
MultichainAccounthas been renamed toMultichainAccountGroupto emphasis more on the the "group" aspect of multichain accounts.References
Changelog
N/A
Checklist