[snap-account-service] Remove extra account-tree-controller dep - #9493
Merged
Conversation
mcmire
force-pushed
the
remove-extra-account-tree-controller-dep
branch
from
July 13, 2026 17:30
fa5ce20 to
00fd12b
Compare
In a future commit, we want to automatically synchronize the `references` field in each package's tsconfig files with that package dependencies. Currently, we would have to make an exception for `snap-account-service`, as it lists `account-tree-controller` as a dependency but purposefully excludes it from its tsconfig files to avoid a circular reference. However, this manual bookkeeping is unnecessary, as `snap-account-service` already works around the circular dependency by copying types from `account-tree-controller` instead of importing them. So the dependency is unnecessary and we can drop it from `package.json`, thereby unlocking `package.json`<->tsconfig syncing.
mcmire
force-pushed
the
remove-extra-account-tree-controller-dep
branch
from
July 13, 2026 17:34
00fd12b to
b7c3e84
Compare
mcmire
marked this pull request as ready for review
July 13, 2026 17:51
gantunesr
approved these changes
Jul 13, 2026
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
In a future commit, we want to automatically synchronize the
referencesfield in each package's tsconfig files with its dependencies. Currently, we would have to make an exception forsnap-account-service, as it listsaccount-tree-controlleras a dependency but purposefully excludes it from its tsconfig files to avoid a circular reference. However, this manual bookkeeping is unnecessary, assnap-account-servicealready works around the circular dependency by copying types fromaccount-tree-controllerinstead of importing them. So the dependency is unnecessary and we can drop it fromsnap-account-service'spackage.json.References
Unblocks #8384.
Checklist
Note
Low Risk
Dependency and documentation-only change; no runtime or API code changes, with types already duplicated locally.
Overview
Removes
@metamask/account-tree-controllerfrom@metamask/snap-account-service’s declared dependencies and updates the monorepo dependency graph (README.md,yarn.lock). The package already avoids importing that controller and uses locally mirrored types insrc/types.tsto break theaccount-tree-controller↔multichain-account-service↔snap-account-servicecycle.The long tsconfig comments that documented why
account-tree-controllerwas omitted from project references are deleted now that the npm dependency no longer exists—references stay limited tokeyring-controllerandmessenger. This alignspackage.jsonwith actual build/runtime usage so future automation can sync tsconfigreferencesfrom dependencies without a special-case exception.Reviewed by Cursor Bugbot for commit b7c3e84. Bugbot is set up for automated code reviews on this repo. Configure here.