Skip to content

feat: add config-registry-{controller, api-service} to wallet - #9928

Merged
mikesposito merged 11 commits into
mainfrom
me/feat/config-registry-to-wallet
Aug 20, 2026
Merged

feat: add config-registry-{controller, api-service} to wallet#9928
mikesposito merged 11 commits into
mainfrom
me/feat/config-registry-to-wallet

Conversation

@mikesposito

@mikespositomikesposito commented Aug 20, 2026

Copy link
Copy Markdown
Member

Explanation

Adding @metamask/config-registry-controller to the wallet package.

References

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
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Medium Risk
Breaking constructor API plus new remote config fetch on wallet startup. Duplicate messenger registration can fail existing consumers that already wire these controllers.

Overview
BREAKING: Default wallet init now constructs ConfigRegistryApiService and ConfigRegistryController, so remote config registry is part of the core wallet graph.

instanceOptions.configRegistryApiService is required (env, optional fetch / policyOptions). configRegistryController is optional (pollingInterval, fallbackConfig). The controller messenger delegates keyring, remote feature flags, and ConfigRegistryApiService:fetchConfig.

Consumers that already register these on a custom root messenger must drop their own wiring or registrations will collide. wallet-cli passes ConfigRegistryApiEnv.PRD.

Reviewed by Cursor Bugbot for commit 4777e53. Bugbot is set up for automated code reviews on this repo. Configure here.

@mikesposito
mikesposito requested a review from a team as a code ownerAugust 20, 2026 18:03
@mikesposito
mikespositodeployed to default-branch August 20, 2026 18:03 — with GitHub Actions Active
@mikesposito
mikespositoforce-pushed the me/feat/config-registry-to-wallet branch from c1299a1 to ff59021CompareAugust 20, 2026 18:08
init: ({ messenger, options }) =>
new ConfigRegistryApiService({
messenger,
env: options.env ?? ConfigRegistryApiEnv.PRD,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it intentional to always hit prod, even locally? Why not require clients to pass this in instead of having the Wallet Library default this?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea was to preserve the optionality, but we can make it a mandatory option

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in 4f4ccda

@mikesposito
mikesposito requested a review from a team as a code ownerAugust 20, 2026 18:42

@mcmiremcmire left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more thing.

): WalletOptions['instanceOptions'] {
return {
configRegistryApiService: {
env: ConfigRegistryApiEnv.PRD,

@mcmiremcmireAug 20, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if I like this either, but at least it's consistent with the defaults wallet-cli uses for other controllers/services (i.e. it uses prod for other APIs).

Comment threadpackages/wallet-cli/CHANGELOG.md Outdated
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>

@mcmiremcmire left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@mikesposito
mikesposito added this pull request to the merge queueAug 20, 2026
Merged via the queue into main with commit e5aa5c5Aug 20, 2026
53 of 54 checks passed
@mikesposito
mikesposito deleted the me/feat/config-registry-to-wallet branch August 20, 2026 19:15
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@mikesposito@mcmire