Skip to content

refactor(transaction-controller): remove incoming transaction support and defer initialization#9012

Draft
matthewwalsh0 wants to merge 8 commits into
mainfrom
feat/remove-tx-controller-deps
Draft

refactor(transaction-controller): remove incoming transaction support and defer initialization#9012
matthewwalsh0 wants to merge 8 commits into
mainfrom
feat/remove-tx-controller-deps

Conversation

@matthewwalsh0
Copy link
Copy Markdown
Member

@matthewwalsh0 matthewwalsh0 commented Jun 5, 2026

Explanation

This PR removes incoming transaction support from TransactionController and decouples its construction from NetworkController availability.

Deferred initialization

Previously, MultichainTrackingHelper called NetworkController:getNetworkClientRegistry synchronously in its constructor. The helper now polls at construction time until NetworkController is available on the messenger, so TransactionController can be registered in any order without requiring a separate initialize() call from the consumer.

Remove incoming transaction support

Incoming transaction polling (via IncomingTransactionHelper and AccountsApiRemoteTransactionSource) is removed entirely. Clients retrieve incoming transactions directly through the accounts API. The RemoteFeatureFlagController:getState and backend service event dependencies that existed solely to drive this subsystem are removed alongside it.

AccountActivityServiceStatusChangedEvent, AccountsControllerSelectedAccountChangeEvent, and BackendWebSocketServiceConnectionStateChangedEvent are dropped from AllowedEvents; AccountActivityServiceTransactionUpdatedEvent is retained as TransactionPoller still uses it to accelerate pending transaction checks.

All fields on TransactionMeta related to incoming transactions are preserved for backwards compatibility with persisted state.

Transaction history trim resilience

getFeatureFlags now returns undefined instead of throwing when RemoteFeatureFlagController is not yet registered. As a consequence, #trimTransactionsForState skips trimming when the history limit flag is unavailable rather than crashing.

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

Base automatically changed from chore/remove-deprecated-tx-options to main June 5, 2026 08:33
@matthewwalsh0 matthewwalsh0 force-pushed the feat/remove-tx-controller-deps branch from f9649f0 to 02fb997 Compare June 5, 2026 10:37
@matthewwalsh0
Copy link
Copy Markdown
Member Author

@metamaskbot publish-preview

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

Preview builds have been published. Learn how to use preview builds in other projects.

Expand for full list of packages and versions.
@metamask-previews/account-tree-controller@7.5.1-preview-c5f8cd0af
@metamask-previews/accounts-controller@39.0.0-preview-c5f8cd0af
@metamask-previews/address-book-controller@7.1.2-preview-c5f8cd0af
@metamask-previews/ai-controllers@0.7.0-preview-c5f8cd0af
@metamask-previews/analytics-controller@1.1.0-preview-c5f8cd0af
@metamask-previews/analytics-data-regulation-controller@0.0.0-preview-c5f8cd0af
@metamask-previews/announcement-controller@8.1.0-preview-c5f8cd0af
@metamask-previews/app-metadata-controller@2.0.1-preview-c5f8cd0af
@metamask-previews/approval-controller@9.0.1-preview-c5f8cd0af
@metamask-previews/assets-controller@8.3.2-preview-c5f8cd0af
@metamask-previews/assets-controllers@108.5.0-preview-c5f8cd0af
@metamask-previews/authenticated-user-storage@2.0.0-preview-c5f8cd0af
@metamask-previews/base-controller@9.1.0-preview-c5f8cd0af
@metamask-previews/base-data-service@0.1.3-preview-c5f8cd0af
@metamask-previews/bridge-controller@73.2.1-preview-c5f8cd0af
@metamask-previews/bridge-status-controller@72.0.2-preview-c5f8cd0af
@metamask-previews/build-utils@3.0.4-preview-c5f8cd0af
@metamask-previews/chain-agnostic-permission@1.6.1-preview-c5f8cd0af
@metamask-previews/chomp-api-service@3.1.0-preview-c5f8cd0af
@metamask-previews/claims-controller@0.5.2-preview-c5f8cd0af
@metamask-previews/client-controller@1.0.1-preview-c5f8cd0af
@metamask-previews/compliance-controller@2.1.0-preview-c5f8cd0af
@metamask-previews/composable-controller@12.0.1-preview-c5f8cd0af
@metamask-previews/config-registry-controller@0.4.0-preview-c5f8cd0af
@metamask-previews/connectivity-controller@0.2.0-preview-c5f8cd0af
@metamask-previews/controller-utils@12.1.0-preview-c5f8cd0af
@metamask-previews/core-backend@6.3.2-preview-c5f8cd0af
@metamask-previews/delegation-controller@3.0.1-preview-c5f8cd0af
@metamask-previews/earn-controller@12.2.0-preview-c5f8cd0af
@metamask-previews/eip-5792-middleware@3.0.4-preview-c5f8cd0af
@metamask-previews/eip-7702-internal-rpc-middleware@0.1.1-preview-c5f8cd0af
@metamask-previews/eip1193-permission-middleware@2.0.1-preview-c5f8cd0af
@metamask-previews/ens-controller@19.1.3-preview-c5f8cd0af
@metamask-previews/eth-block-tracker@15.0.1-preview-c5f8cd0af
@metamask-previews/eth-json-rpc-middleware@23.1.3-preview-c5f8cd0af
@metamask-previews/eth-json-rpc-provider@6.0.1-preview-c5f8cd0af
@metamask-previews/foundryup@1.0.1-preview-c5f8cd0af
@metamask-previews/gas-fee-controller@26.2.2-preview-c5f8cd0af
@metamask-previews/gator-permissions-controller@4.2.0-preview-c5f8cd0af
@metamask-previews/geolocation-controller@0.1.3-preview-c5f8cd0af
@metamask-previews/json-rpc-engine@10.5.0-preview-c5f8cd0af
@metamask-previews/json-rpc-middleware-stream@8.0.8-preview-c5f8cd0af
@metamask-previews/keyring-controller@26.0.0-preview-c5f8cd0af
@metamask-previews/logging-controller@8.0.2-preview-c5f8cd0af
@metamask-previews/message-manager@14.1.2-preview-c5f8cd0af
@metamask-previews/messenger@1.2.0-preview-c5f8cd0af
@metamask-previews/messenger-cli@0.2.0-preview-c5f8cd0af
@metamask-previews/money-account-balance-service@1.0.2-preview-c5f8cd0af
@metamask-previews/money-account-controller@0.3.2-preview-c5f8cd0af
@metamask-previews/money-account-upgrade-controller@2.0.3-preview-c5f8cd0af
@metamask-previews/multichain-account-service@10.0.2-preview-c5f8cd0af
@metamask-previews/multichain-api-middleware@3.1.3-preview-c5f8cd0af
@metamask-previews/multichain-network-controller@3.1.3-preview-c5f8cd0af
@metamask-previews/multichain-transactions-controller@7.1.1-preview-c5f8cd0af
@metamask-previews/name-controller@9.1.2-preview-c5f8cd0af
@metamask-previews/network-controller@32.0.0-preview-c5f8cd0af
@metamask-previews/network-enablement-controller@5.3.0-preview-c5f8cd0af
@metamask-previews/notification-services-controller@24.1.2-preview-c5f8cd0af
@metamask-previews/passkey-controller@2.0.1-preview-c5f8cd0af
@metamask-previews/permission-controller@13.1.1-preview-c5f8cd0af
@metamask-previews/permission-log-controller@5.1.0-preview-c5f8cd0af
@metamask-previews/perps-controller@7.0.0-preview-c5f8cd0af
@metamask-previews/phishing-controller@17.2.0-preview-c5f8cd0af
@metamask-previews/polling-controller@16.0.6-preview-c5f8cd0af
@metamask-previews/preferences-controller@23.1.0-preview-c5f8cd0af
@metamask-previews/profile-metrics-controller@3.1.6-preview-c5f8cd0af
@metamask-previews/profile-sync-controller@28.1.1-preview-c5f8cd0af
@metamask-previews/ramps-controller@14.1.1-preview-c5f8cd0af
@metamask-previews/rate-limit-controller@7.0.1-preview-c5f8cd0af
@metamask-previews/react-data-query@0.2.1-preview-c5f8cd0af
@metamask-previews/remote-feature-flag-controller@4.2.2-preview-c5f8cd0af
@metamask-previews/sample-controllers@5.0.1-preview-c5f8cd0af
@metamask-previews/seedless-onboarding-controller@10.0.0-preview-c5f8cd0af
@metamask-previews/selected-network-controller@26.1.3-preview-c5f8cd0af
@metamask-previews/shield-controller@5.1.2-preview-c5f8cd0af
@metamask-previews/signature-controller@39.2.4-preview-c5f8cd0af
@metamask-previews/snap-account-service@0.3.0-preview-c5f8cd0af
@metamask-previews/social-controllers@2.2.1-preview-c5f8cd0af
@metamask-previews/storage-service@1.0.1-preview-c5f8cd0af
@metamask-previews/subscription-controller@6.1.3-preview-c5f8cd0af
@metamask-previews/transaction-controller@66.0.1-preview-c5f8cd0af
@metamask-previews/transaction-pay-controller@23.1.0-preview-c5f8cd0af
@metamask-previews/user-operation-controller@41.2.3-preview-c5f8cd0af
@metamask-previews/wallet@2.0.0-preview-c5f8cd0af

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.

1 participant