Skip to content

Conversation

mcmire
Copy link
Contributor

@mcmire mcmire commented Sep 15, 2025

Explanation

Currently, the confirmExternalTransaction, getNonceLock, getTransactions, and updateTransaction methods in TransactionController are accessed by the SmartTransactionsController constructor, but in a non-standard way: SmartTransactionsController takes function references, when we would like it to call these methods via the messenger instead.

This commit exposes these methods through TransactionController's messenger so we can do this.

References

Unblocks MetaMask/smart-transactions-controller#533.

Also see https://github.com/MetaMask/metamask-mobile/blob/d5893bdcb0fa9c5e73b23ba566b6619730849b4c/app/core/Engine/Engine.ts#L1131 for how SmartTransactionsController is instantiated in Mobile today.

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

…oller through messenger

Currently, the `confirmExternalTransaction`, `getNonceLock`,
`getTransactions`, and `updateTransaction` methods in
`TransactionController` are accessed by the
`SmartTransactionsController` constructor, but in a non-standard way:
`SmartTransactionsController` takes function references, when we would
like to call these methods via the messenger instead.

This commit exposes these methods through TransactionController's
messenger so we can do this.
@mcmire mcmire force-pushed the expose-more-txn-controller-actions branch from 2215843 to a31aa8a Compare September 15, 2025 21:48
@mcmire mcmire marked this pull request as ready for review September 15, 2025 21:55
@mcmire mcmire requested review from a team as code owners September 15, 2025 21:55
cursor[bot]

This comment was marked as outdated.

@mcmire mcmire enabled auto-merge (squash) September 16, 2025 13:29
@mcmire mcmire merged commit 32fe773 into main Sep 16, 2025
239 checks passed
@mcmire mcmire deleted the expose-more-txn-controller-actions branch September 16, 2025 14:23
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.

3 participants