Skip to content

fix: use exported controller stateChange events#9478

Open
salimtb wants to merge 8 commits into
mainfrom
fix/assets-controller-state-change-events
Open

fix: use exported controller stateChange events#9478
salimtb wants to merge 8 commits into
mainfrom
fix/assets-controller-state-change-events

Conversation

@salimtb

@salimtb salimtb commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Replace locally constructed stateChanged messenger types with the exported stateChange events from AccountTreeController, ClientController, and NetworkEnablementController to fix typing mismatches in consumers.

Explanation

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
Wrong event names could have left asset tracking idle on account-tree init, network enablement, or UI/keyring lifecycle; the fix restores those triggers but should be validated in integration.

Overview
AssetsController now wires messenger subscriptions and allowed-event types to the canonical stateChange events exported by AccountTreeController, ClientController, and NetworkEnablementController, instead of locally invented :stateChanged aliases built with ControllerStateChangedEvent.

Runtime subscriptions in AssetsController (account tree init, enabled networks, UI open + keyring lifecycle) and the test mock messenger event list are updated to match. Tests publish ClientController:stateChange, AccountTreeController:stateChange, and NetworkEnablementController:stateChange accordingly. The duplicate NetworkEnablementController:stateChanged entry is removed from the mock.

Changelog records this as a fix for consumers with typing mismatches (#9478).

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

salimtb added 8 commits July 12, 2026 12:23
Replace locally constructed stateChanged messenger types with the
exported stateChange events from AccountTreeController, ClientController,
and NetworkEnablementController to fix typing mismatches in consumers.
@salimtb salimtb marked this pull request as ready for review July 12, 2026 11:02
@salimtb salimtb requested review from a team as code owners July 12, 2026 11:02
@salimtb salimtb temporarily deployed to default-branch July 12, 2026 11:03 — with GitHub Actions Inactive
@salimtb salimtb changed the title fix(assets-controller): use exported controller stateChange events fix: use exported controller stateChange events Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant