Skip to content

Conversation

@cryptodev-2s
Copy link
Contributor

@cryptodev-2s cryptodev-2s commented Sep 9, 2025

Explanation

This PR migrates MultichainTransactionsController to the new @metamask/messenger message bus, as opposed to the one exported from @metamask/base-controller.

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, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

Note

Migrates MultichainTransactionsController to @metamask/messenger and updates metadata, tests, and configs accordingly.

  • Multichain Transactions Controller:
    • Switches from RestrictedMessenger (@metamask/base-controller) to Messenger (@metamask/messenger), replacing messagingSystem.* with messenger.* and importing from @metamask/base-controller/next.
    • Renames metadata property anonymous to includeInDebugSnapshot.
  • Tests:
    • Refactors to use a root Messenger with delegation, publishing via rootMessenger, and updates deriveStateFromMetadata usage.
  • Package/Config:
    • Adds dependency on @metamask/messenger and updates TS project references.
    • Updates README dependency graph to include multichain_transactions_controller --> messenger.
  • Changelog:
    • Notes breaking changes for the new Messenger and metadata rename.

Written by Cursor Bugbot for commit 87bee34. This will update automatically on new commits. Configure here.

cursor[bot]

This comment was marked as outdated.

mcmire
mcmire previously approved these changes Sep 10, 2025
@cryptodev-2s cryptodev-2s force-pushed the cryptodev-2s/messenger/multichain-transactions-controller branch from 57b9797 to f10d859 Compare October 7, 2025 12:39
cursor[bot]

This comment was marked as outdated.

mcmire
mcmire previously approved these changes Oct 7, 2025
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

LGTM!

mikesposito and others added 4 commits October 20, 2025 11:51
…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');
Copy link

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.

Fix in Cursor Fix in Web

@FrederikBolding FrederikBolding added this pull request to the merge queue Oct 27, 2025
auto-merge was automatically disabled October 27, 2025 11:38

Pull Request is not mergeable

@FrederikBolding FrederikBolding removed this pull request from the merge queue due to the queue being cleared Oct 27, 2025
@FrederikBolding FrederikBolding added this pull request to the merge queue Oct 27, 2025
Merged via the queue into main with commit e55aca8 Oct 27, 2025
256 of 257 checks passed
@FrederikBolding FrederikBolding deleted the cryptodev-2s/messenger/multichain-transactions-controller branch October 27, 2025 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants