-
-
Notifications
You must be signed in to change notification settings - Fork 263
refactor: migrate MultichainTransactionsController to @metamask/messenger
#6542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: migrate MultichainTransactionsController to @metamask/messenger
#6542
Conversation
57b9797 to
f10d859
Compare
mcmire
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
packages/multichain-transactions-controller/src/MultichainTransactionsController.test.ts
Show resolved
Hide resolved
…r/multichain-transactions-controller
…r/multichain-transactions-controller * origin/main: (35 commits) feat: `JsonRpcEngineV2` (#6176) Release 641.0.0 (#6940) feat: Add transaction emulation actions (#6935) Release/640.0.0 (#6934) fix(core-backend): control randomness to fix flaky test (#6936) chore: Add `@metamask-previews/*` to NPM age gate exceptions (#6937) Release/639.0.0 (#6931) feat: make getCryptoApproveTransactionParams synchronous (#6930) feat: add new actions to `KeyringController` (#6928) feat: add `getAccounts` to `AccountsController` (#6927) chore: remove `Monad Mainnet` single call balance contract and add into account v4 (#6929) Release/638.0.0 (#6923) fix: Downgrade `multiformats` to `^9.9.0` to avoid ESM-only dependency (#6920) Release/637.0.0 (#6919) feat(account-tree-controller): add callbacks for hidden and pinned data (#6910) Release 636.0.0 (#6918) fix(core-backend): reconnection logic (#6861) fix: Tx state listener and signature coverage (#6906) Release/635.0.0 (#6917) fix(base-controller): add TypeScript declaration file for legacy module resolution (#6915) ...
| }; | ||
|
|
||
| const publishSpy = jest.spyOn(messenger, 'publish'); | ||
| const publishSpy = jest.spyOn(rootMessenger, 'publish'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Test Misconfiguration Affects Event Verification
The "does not publish events for other transaction statuses" test spies on the rootMessenger instead of the controller's own messenger. This prevents it from accurately verifying the MultichainTransactionsController's event publishing behavior, making its assertions ineffective and inconsistent with other event-related tests.
Pull Request is not mergeable
Explanation
This PR migrates
MultichainTransactionsControllerto the new@metamask/messengermessage bus, as opposed to the one exported from@metamask/base-controller.References
Checklist
Note
Migrates
MultichainTransactionsControllerto@metamask/messengerand updates metadata, tests, and configs accordingly.RestrictedMessenger(@metamask/base-controller) toMessenger(@metamask/messenger), replacingmessagingSystem.*withmessenger.*and importing from@metamask/base-controller/next.anonymoustoincludeInDebugSnapshot.Messengerwith delegation, publishing viarootMessenger, and updatesderiveStateFromMetadatausage.@metamask/messengerand updates TS project references.multichain_transactions_controller --> messenger.Messengerand metadata rename.Written by Cursor Bugbot for commit 87bee34. This will update automatically on new commits. Configure here.