Skip to content

Latest commit

 

History

History
1329 lines (858 loc) · 80.3 KB

File metadata and controls

1329 lines (858 loc) · 80.3 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Changed

  • Bump @metamask/bridge-controller from ^72.0.4 to ^73.0.1 (#8850, #8866)
  • Remove unnecessary type assertions for bridge quotes (#8805)

Changed

  • Pass isInternal: true to all internal addTransaction / addTransactionBatch calls to adopt the explicit isInternal flag introduced in @metamask/transaction-controller (#8633)
  • Bump @metamask/profile-sync-controller from ^28.0.2 to ^28.1.0 (#8783)
  • Bump @metamask/transaction-controller from ^65.3.0 to ^66.0.0 (#8796, #8848)
  • Bump @metamask/gas-fee-controller from ^26.2.1 to ^26.2.2 (#8834)
  • Bump @metamask/polling-controller from ^16.0.5 to ^16.0.6 (#8834)

Changed

  • Bump @metamask/accounts-controller from ^38.1.0 to ^38.1.1 (#8774)
  • Bump @metamask/bridge-controller from ^72.0.3 to ^72.0.4 (#8774)
  • Bump @metamask/network-controller from ^31.1.0 to ^32.0.0 (#8774)
  • Bump @metamask/controller-utils from ^12.0.0 to ^12.1.0 (#8774)

Changed

  • Bump @metamask/network-controller from ^31.0.0 to ^31.1.0 (#8765)
  • Bump @metamask/bridge-controller from ^72.0.2 to ^72.0.3 (#8773)

Changed

  • Bump @metamask/bridge-controller from ^72.0.0 to ^72.0.2 (#8738, #8755)
  • Bump @metamask/accounts-controller from ^38.0.0 to ^38.1.0 (#8755)
  • Bump @metamask/controller-utils from ^11.20.0 to ^12.0.0 (#8755)
  • Bump @metamask/gas-fee-controller from ^26.2.0 to ^26.2.1 (#8755)
  • Bump @metamask/network-controller from ^30.1.0 to ^31.0.0 (#8755)
  • Bump @metamask/polling-controller from ^16.0.4 to ^16.0.5 (#8755)
  • Bump @metamask/transaction-controller from ^65.2.0 to ^65.3.0 (#8755)

Changed

  • Bump @metamask/bridge-controller from ^71.0.0 to ^72.0.0 (#8706, #8721, #8737)
  • Bump @metamask/transaction-controller from ^65.0.0 to ^65.2.0 (#8691, #8722)
  • Bump @metamask/accounts-controller from ^37.2.0 to ^38.0.0 (#8665)
  • Bump @metamask/messenger from ^1.1.1 to ^1.2.0 (#8632)
  • Bump @metamask/keyring-controller from ^25.2.0 to ^25.5.0 (#8634, #8665, #8722)
  • Bump @metamask/network-controller from ^30.0.1 to ^30.1.0 (#8636)
  • Bump @metamask/gas-fee-controller from ^26.1.1 to ^26.2.0 (#8722)

Fixed

  • When submitIntent records bridge history keyed by orderUid, pass originalTransactionId at the top level to #addTxToHistory so getInitialHistoryItem links the history item to the synthetic TransactionController entry instead of incorrectly using orderUid (#8655)

Added

  • Add optional tokenSecurityTypeDestination?: string \| null to BridgeHistoryItem, StartPollingForBridgeTxStatusArgs[Serialized], and the submitTx / submitIntent arguments; when provided, it's persisted on the history item and emitted as token_security_type_destination on post-submit analytics events (#8595)

Changed

  • Bump @metamask/transaction-controller from ^64.3.0 to ^65.0.0 (#8585, #8613)
  • Bump @metamask/bridge-controller from ^70.2.0 to ^71.0.0 (#8622)

Added

  • Remove stale bridge transactions from txHistory to prevent excessive polling. Once a history item exceeds the configured maximum age, the status is fetched once, then the src tx hash's receipt is retrieved. If there is no receipt, the history item's hash is presumed to be invalid and the entry is deleted from state. (#8479)
  • Add missing action types for public BridgeStatusController methods (#8367)
    • The following types are now available:
      • BridgeStatusControllerSubmitTxAction
      • BridgeStatusControllerSubmitIntentAction
      • BridgeStatusControllerGetBridgeHistoryItemByTxMetaIdAction

Changed

  • BREAKING: Replace transactionFailed and transactionConfirmed event subscriptions with TransactionController:transactionStatusUpdated (#8479)
  • BREAKING: Add RemoteFeatureFlags:getState to allowed actions to retrieve max history item age config (#8479)
  • Add account_hardware_type field to all cross-chain swap analytics events (#8503)
    • account_hardware_type carries the specific hardware wallet brand (e.g. 'Ledger', 'QR Hardware') or null for software wallets
    • is_hardware_wallet is now derived from account_hardware_type !== null, keeping both fields in sync
  • getEVMTxPropertiesFromTransactionMeta now accepts an optional account parameter to populate account_hardware_type for TransactionController:transactionFailed events (#8503)
  • Bump @metamask/accounts-controller from ^37.1.1 to ^37.2.0 (#8363)
  • Bump @metamask/keyring-controller from ^25.1.1 to ^25.2.0 (#8363)
  • Bump @metamask/messenger from ^1.0.0 to ^1.1.1 (#8364, #8373)
  • Bump @metamask/transaction-controller from ^64.0.0 to ^64.3.0 (#8432, #8447, #8482)
  • Bump @metamask/base-controller from ^9.0.1 to ^9.1.0 (#8457)
  • Bump @metamask/bridge-controller from ^70.0.1 to ^70.2.0 (#8466, #8474, #8571)

Fixed

  • Prevent invalid src hashes from being persisted in txHistory (#8479)
    • Make transaction status subscribers generic so that txHistory items get updated if there are any transaction updates matching by actionId, txMetaId, hash or type
    • Skip saving smart transaction hashes on transaction submission. This used to make it possible for invalid src hashes to be stored in state and polled indefinitely. Instead, the txHistory item will now be updated with the confirmed tx hash when the transactionStatusUpdated event is published
    • If there is no srcTxHash in state, attempt to set it based on the local TransactionController state

Changed

  • Bump @metamask/bridge-controller from ^70.0.0 to ^70.0.1 (#8359)
  • Bump @metamask/transaction-controller from ^63.3.1 to ^64.0.0 (#8359)
  • Add missing @metamask/messenger dependency (#8318)
  • Bump @metamask/controller-utils from ^11.19.0 to ^11.20.0 (#8344)

Deprecated

  • Deprecate BridgeStatusAction in favor of separate action types (#8367)

Changed

  • Bump @metamask/bridge-controller from ^69.2.3 to ^70.0.0 (#8340)

Changed

  • Bump @metamask/snaps-controllers from ^17.2.0 to ^19.0.0 (#8319)
  • Bump @metamask/accounts-controller from ^37.1.0 to ^37.1.1 (#8325)
  • Bump @metamask/bridge-controller from ^69.2.2 to ^69.2.3 (#8325)
  • Bump @metamask/profile-sync-controller from ^28.0.1 to ^28.0.2 (#8325)

Changed

  • Bump @metamask/accounts-controller from ^37.0.0 to ^37.1.0 (#8317)
  • Bump @metamask/base-controller from ^9.0.0 to ^9.0.1 (#8317)
  • Bump @metamask/bridge-controller from ^69.2.1 to ^69.2.2 (#8317)
  • Bump @metamask/gas-fee-controller from ^26.1.0 to ^26.1.1 (#8317)
  • Bump @metamask/keyring-controller from ^25.1.0 to ^25.1.1 (#8317)
  • Bump @metamask/network-controller from ^30.0.0 to ^30.0.1 (#8317)
  • Bump @metamask/polling-controller from ^16.0.3 to ^16.0.4 (#8317)
  • Bump @metamask/profile-sync-controller from ^28.0.0 to ^28.0.1 (#8317)
  • Bump @metamask/transaction-controller from ^63.1.0 to ^63.3.1 (#8301, #8313, #8317)

Changed

  • Bump @metamask/bridge-controller from ^69.1.1 to ^69.2.1 (#8265, #8288)
  • Bump @metamask/transaction-controller from ^63.0.0 to ^63.1.0 (#8272)

Fixed

  • Publish UnifiedSwapBridge Failed event for any exception thrown during submitTx. Previously the Failed event was only getting published for EVM txs after tx submission (#8277)
  • Keep EIP-7702 batching disabled for gasless transactions that use smart transactions / eth_sendBundle when the quote is gas-included but not gas-included-7702 even when the account is a smart account (#8275)
  • For hardware wallets on MetaMask Mobile, non-batch EVM flows with ERC-20 approval now run the hardware-wallet delay before waiting for approval confirmation, preserving Ledger second-prompt spacing while gas estimation still runs after allowance is set on-chain (#8268)

Changed

  • BREAKING: Replace transaction handlers provided to the BridgeStatusController constructor with calls to the TransactionController, through the controller messenger. Clients will need to add the TransactionControllerUpdateTransactionAction, TransactionControllerAddTransactionAction, and TransactionControllerEstimateGasFeeAction permissions to their controller init modules in addition to updating the constructor (#8188)
  • Moved controller calls from bridge-status-controller.ts to their own utils for better readability (#8226)

Added

  • Added more unit test coverage for intents and EVM transactions. Also refactored some mocks and code blocks to improve testability (#8186)

Changed

  • Bump @metamask/bridge-controller from ^69.1.0 to ^69.1.1 (#8225)
  • Bump @metamask/gas-fee-controller from ^26.0.3 to ^26.1.0 (#8225)
  • BREAKING: BridgeStatusControllerMessenger must now allow TransactionController:isAtomicBatchSupported action (#8125)
  • Bump @metamask/transaction-controller from ^62.21.0 to ^63.0.0 (#8217, #8225)

Fixed

  • Delegated accounts (EIP-7702) now use batched transactions to avoid in-flight transaction limit (#8125)
  • Bridge transaction types now properly matched in 7702 batch path (#8125)
  • Delegated account batch transactions now recorded in bridge status history (#8125)
  • Gas fields now included for delegated account transactions that are not gas-sponsored (#8125)

Added

  • Added optional activeAbTests context support so Unified SwapBridge events can include active_ab_tests independently of ab_tests. (#8152)

Changed

  • Bump @metamask/bridge-controller from ^69.0.1 to ^69.1.0 (#8168)

Changed

  • Bump @metamask/profile-sync-controller from ^27.1.0 to ^28.0.0 (#8162)
  • Bump @metamask/bridge-controller from ^69.0.0 to ^69.0.1 (#8162)

Changed

  • Bump @metamask/transaction-controller from ^62.19.0 to ^62.21.0, (#8104, #8140)
  • Bump @metamask/accounts-controller from ^36.0.1 to ^37.0.0 (8140)
  • Bump @metamask/bridge-controller from ^68.0.0 to ^69.0.0 (8140)

Added

  • Added optional abTests property to BridgeHistoryItem to persist A/B test context across the transaction lifecycle (#8007)
  • Added optional abTests parameter to StartPollingForBridgeTxStatusArgs (#8007)
  • Added optional abTests parameter to submitTx and submitIntent methods for A/B test experiment attribution (#8007)
  • trackUnifiedSwapBridgeEvent now resolves ab_tests from event properties or transaction history and includes it in emitted events (#8007)

Changed

  • Bump @metamask/bridge-controller from ^67.1.1 to ^68.0.0 (#8024, #8051, #8070, #8101)
  • Bump @metamask/transaction-controller from ^62.17.1 to ^62.19.0 (#8005, #8031)
  • BREAKING: Move intent signing and submission orchestration into BridgeStatusController, including internal EIP-712 signing via KeyringController and the new IntentManager flow. (#8048)

Changed

  • Bump @metamask/accounts-controller from ^36.0.0 to ^36.0.1 (#7996)
  • Bump @metamask/gas-fee-controller from ^26.0.2 to ^26.0.3 (#7996)
  • Bump @metamask/network-controller from ^29.0.0 to ^30.0.0 (#7996)
  • Bump @metamask/polling-controller from ^16.0.2 to ^16.0.3 (#7996)
  • Bump @metamask/transaction-controller from ^62.17.0 to ^62.17.1 (#7996)
  • Bump @metamask/controller-utils from ^11.18.0 to ^11.19.0 (#7995)
  • Bump @metamask/bridge-controller from ^67.0.0 to ^67.1.1 (#7995, #7996)

Added

  • BREAKING: Retrieve JWT token from the ProfileSyncController and include it in bridge request headers (#7955)
  • Bump @metamask/bridge-controller from ^66.2.0 to ^67.0.0 (#7961)

Added

  • Added location property to BridgeHistoryItem to persist the entry point across the transaction lifecycle (#7931)
  • Added location parameter to StartPollingForBridgeTxStatusArgs (#7931)
  • Added optional location parameter to submitTx method (#7931)

Changed

  • All post-submission events (Submitted, Completed, Failed, PollingStatusUpdated, StatusValidationFailed) now include the location property from BridgeHistoryItem (#7931)

Fixed

  • Fix usd_amount_source default value in EVM transaction metrics properties from 100 to 0 (#7899)

Changed

  • Bump @metamask/bridge-controller from ^66.1.0 to `^66.1.1 (#7910)

Changed

  • Bump @metamask/accounts-controller from ^35.0.2 to ^36.0.0 (#7897)
  • Bump @metamask/bridge-controller from ^65.3.0 to ^66.1.0, (#7862, #7897)
  • Bump @metamask/transaction-controller from ^62.14.0 to ^62.17.0, (#7854, #7872, #7897)

Added

  • Add Unified SwapBridge Polling Status Updated metrics event with status property (max_polling_reached or manually_restarted), emitted when polling stops due to max attempts or is manually restarted (#7825)

Changed

  • BREAKING Re-key intent history items and extract intent code into a new IntentManager class
  • BREAKING handle intent orders in fetch bridge tx function (#7756)
  • Bump @metamask/transaction-controller from ^62.11.0 to ^62.14.0 (#7775, #7802, #7832)
  • Bump @metamask/bridge-controller from ^65.1.0 to ^65.3.0 (#7802, #7837)

Fixed

  • Fix Tron same-chain swap polling and Completed event tracking (#7697)

Changed

  • Bump @metamask/bridge-controller from ^65.0.0 to ^65.1.0 (#7751, #7763)
  • Bump @metamask/transaction-controller from ^62.9.2 to ^62.11.0 (#7737, #7760)

Changed

  • Bump @metamask/bridge-controller from ^64.8.2 to ^65.0.0 (#7731)

Changed

  • Bump @metamask/bridge-controller from ^64.8.1 to ^64.8.2 (#7722)

Fixed

  • Fix transaction failure tracking for pre-submission failures by using actionId as a temporary history key (#7696)

Changed

Fixed

  • Fix Tron same-chain swap polling and Completed event tracking (#7697)

Changed

  • Bump @metamask/accounts-controller from ^35.0.1 to ^35.0.2 (#7642)
  • Bump @metamask/gas-fee-controller from ^26.0.1 to ^26.0.2 (#7642)
  • Bump @metamask/network-controller from ^28.0.0 to ^29.0.0 (#7642)
  • Bump @metamask/polling-controller from ^16.0.1 to ^16.0.2 (#7642)
  • Bump @metamask/transaction-controller from ^62.9.1 to ^62.9.2 (#7642)
  • Bump @metamask/bridge-controller from ^64.4.1 to ^64.5.1 (#7622, #7642)

Changed

  • Bump @metamask/transaction-controller from ^62.8.0 to ^62.9.1 (#7602, #7604)
  • Bump @metamask/network-controller from ^27.2.0 to ^28.0.0 (#7604)
  • Bump @metamask/accounts-controller from ^35.0.0 to ^35.0.1 (#7604)
  • Bump @metamask/bridge-controller from ^64.4.0 to ^64.4.1 (#7604)
  • Bump @metamask/gas-fee-controller from ^26.0.0 to ^26.0.1 (#7604)
  • Bump @metamask/polling-controller from ^16.0.0 to ^16.0.1 (#7604)

Fixed

  • Use BRIDGE_PREFERRED_GAS_ESTIMATE from @metamask/bridge-controller for gas price estimates to align with validation (#7582)

Added

  • Add intent based transaction support (#6547)

Changed

  • Bump @metamask/transaction-controller from ^62.7.0 to ^62.8.0 (#7596)
  • Bump @metamask/bridge-controller from ^64.3.0 to ^64.4.0 (#7596)
  • Bump @metamask/controller-utils from ^11.17.0 to ^11.18.0 (#7583)
  • Bump @metamask/network-controller from ^27.1.0 to ^27.2.0 (#7583)

Changed

  • BREAKING Use CrossChain API instead of the intent manager package for intent order submission (#6547)
  • Bump @metamask/snaps-controllers from ^14.0.1 to ^17.2.0 (#7550)
  • Upgrade @metamask/utils from ^11.8.1 to ^11.9.0 (#7511)
  • Bump @metamask/network-controller from ^27.0.0 to ^27.1.0 (#7534)
  • Bump @metamask/controller-utils from ^11.16.0 to ^11.17.0 (#7534)
  • Bump @metamask/bridge-controller from ^64.2.0 to ^64.3.0 (#7574)

Changed

  • Bump @metamask/transaction-controller from ^62.5.0 to ^62.7.0 (#7430, #7494)
  • Bump @metamask/bridge-controller from ^64.1.0 to ^64.2.0 (#7509)

Changed

  • Bump @metamask/bridge-controller from ^64.0.0 to ^64.1.0 (#7422)
  • Bump @metamask/transaction-controller from ^62.4.0 to ^62.5.0 (#7325)

Fixed

  • Fix MAX native token swap failing with "insufficient gas" when STX is off by using quote's txFee instead of re-estimating gas when gasIncluded is true (#7306)

Changed

  • BREAKING: Bump @metamask/bridge-controller from ^63.2.0 to ^64.0.0 (#7295)
  • Improve type safety by replacing tx data type assertions with type predicates (#7228)
  • Submit resetApproval tx before the tx approval if it is included in the quoteResponse (#7228)
  • Bump @metamask/network-controller from ^26.0.0 to ^27.0.0 (#7258)
  • Bump @metamask/transaction-controller from ^62.3.0 to ^62.4.0 (#7257, #7289)

Changed

  • Bump @metamask/bridge-controller from ^63.1.0 to ^63.2.0 (#7245)
  • Move peer dependencies for controller and service packages to direct dependencies (#7209, #7220, #7236)
    • The dependencies moved are:
      • @metamask/accounts-controller (^35.0.0)
      • @metamask/bridge-controller (^63.0.0)
      • @metamask/gas-fee-controller (^26.0.0)
      • @metamask/network-controller (^26.0.0)
      • @metamask/snaps-controllers (^14.0.1)
      • @metamask/transaction-controller (^62.3.0)
    • In clients, it is now possible for multiple versions of these packages to exist in the dependency tree.
      • For example, this scenario would be valid: a client relies on @metamask/controller-a 1.0.0 and @metamask/controller-b 1.0.0, and @metamask/controller-b depends on @metamask/controller-a 1.1.0.
    • Note, however, that the versions specified in the client's package.json always "win", and you are expected to keep them up to date so as not to break controller and service intercommunication.
  • Bump @metamask/bridge-controller from ^63.0.0 to ^63.1.0 (#7238)

Removed

  • Remove direct QuotesReceived event publishing to avoid race conditions that can happen when clients navigate and reset state. Update submitTx to accept quotesReceivedContext (replace isLoading/warnings) and propagate context to the BridgeController through the `stopPollingForQuotes call (#7242)

Changed

  • BREAKING: Bump @metamask/bridge-controller from ^62.0.0 to ^63.0.0 (#7207)

Changed

  • Bump @metamask/polling-controller from ^15.0.0 to ^16.0.0 (#7202)
  • Bump @metamask/controller-utils from ^11.15.0 to ^11.16.0 (#7202)
  • BREAKING: Bump @metamask/transaction-controller from ^61.0.0 to ^62.0.0 (#7202)
  • BREAKING: Bump @metamask/network-controller from ^25.0.0 to ^26.0.0 (#7202)
  • BREAKING: Bump @metamask/gas-fee-controller from ^25.0.0 to ^26.0.0 (#7202)
  • BREAKING: Bump @metamask/bridge-controller from ^61.0.0 to ^62.0.0 (#7202)
  • BREAKING: Bump @metamask/accounts-controller from ^34.0.0 to ^35.0.0 (#7202)
  • Update submitTx handler to accept optional isLoading and warnings arguments. When isLoading=true, the QuotesReceived event is published (#7182)

Changed

  • BREAKING: Bump @metamask/bridge-controller from ^60.0.0 to ^61.0.0 (#7179)

Added

  • Added support for bridging and swapping tokens on the Tron blockchain (#6862)

Added

  • Add isGasFeeSponsored field in transaction batch params (#7064)

Changed

  • BREAKING: Bump @metamask/bridge-controller from ^59.0.0 to ^60.0.0 (#7100)

Changed

  • BREAKING: Bump @metamask/bridge-controller from ^58.0.0 to ^59.0.0 (#7043)

Changed

  • BREAKING: Bump @metamask/bridge-controller from ^57.0.0 to ^58.0.0 (#7011)

Changed

  • BREAKING: Bump @metamask/bridge-controller from ^56.0.0 to ^57.0.0 (#7003)

Changed

  • BREAKING: Use new Messenger from @metamask/messenger (#6444)
    • Previously, BridgeStatusController accepted a RestrictedMessenger instance from @metamask/base-controller.
  • BREAKING: Bump @metamask/accounts-controller from ^33.0.0 to ^34.0.0 (#6962)
  • BREAKING: Bump @metamask/bridge-controller from ^55.0.0 to ^56.0.0 (#6962)
  • BREAKING: Bump @metamask/gas-fee-controller from ^24.0.0 to ^25.0.0 (#6962)
  • BREAKING: Bump @metamask/network-controller from ^24.0.0 to ^25.0.0 (#6962)
  • BREAKING: Bump @metamask/transaction-controller from ^60.0.0 to ^61.0.0 (#6962)
  • Bump @metamask/base-controller from ^8.4.2 to ^9.0.0 (#6962)
  • Bump @metamask/polling-controller from ^14.0.1 to ^15.0.0 (#6940, #6962)

Changed

  • BREAKING: Bump peer dependency @metamask/bridge-controller from ^54.0.0 to ^55.0.0 (#6923)
  • Bump @metamask/base-controller from ^8.4.1 to ^8.4.2 (#6917)

Changed

  • BREAKING: Bump peer dependency @metamask/bridge-controller from ^53.0.0 to ^54.0.0 (#6908)

Fixed

  • BREAKING: Update QuoteResponse type used in submitTx handler (#6892)

Changed

  • Publish destinationTransactionCompleted event when a bridge tx completes on the destination chain (#6900)

Changed

  • BREAKING: Bump peer dependency @metamask/bridge-controller from ^52.0.0 to ^53.0.0 (#6895)
  • Bump @metamask/network-controller from ^24.2.2 to ^24.3.0 (#6883)
  • Bump @metamask/transaction-controller from ^60.7.0 to ^60.8.0 (#6883)

Fixed

  • Fix issue with Mobile where app would crash after a successful tx (#6890)
  • Fix BridgeController initialization in unit tests (#6891)

Changed

  • BREAKING: Bump peer dependency @metamask/bridge-controller from ^51.0.0 to ^52.0.0 (#6834)

Changed

  • Bump peer dependency @metamask/bridge-controller from ^50.0.0 to ^51.0.0 (#6824)

Changed

  • BREAKING: Bump peer dependency @metamask/bridge-controller from ^49.0.0 to ^50.0.0 (#6818)

Changed

  • Bump @metamask/base-controller from ^8.4.0 to ^8.4.1 (#6807)
  • Bump @metamask/controller-utils from ^11.14.0 to ^11.14.1 (#6807)
  • Bump @metamask/polling-controller from ^14.0.0 to ^14.0.1 (#6807)

Changed

  • BREAKING: Bump peer dependency @metamask/bridge-controller from ^48.0.0 to ^49.0.0 (#6806)

Changed

  • BREAKING: Bump peer dependency @metamask/bridge-controller from ^47.2.0 to ^48.0.0 (#6780)

Changed

  • Make QuoteMetadata optional when calling submitTx (#6739)
  • Skip event publishing for transactions submitted outside of the Unified Swap and Bridge experience (#6739)
    • On tx submission, add the quote's featureId to txHistory
    • When transaction statuses change, check the featureId and skip event publishing when it's not undefined
    • This affects the Submitted, Completed and Failed events

Changed

  • Bump @metamask/transaction-controller from 60.4.0 to 60.5.0 (#6733)

Changed

  • Bump @metamask/utils from ^11.8.0 to ^11.8.1 (#6708)
  • BREAKING Add a required accountAddress parameter to the submitTx handler (#6719)

Removed

  • Deprecate the unused SnapConfirmationViewed event (#6719)

Fixed

  • Replace AccountsController:getSelectedMultichainAccount usages with AccountsController:getAccountByAddress` when reading account details required for submitting Solana transactions (#6719)

Added

  • Add support for Bitcoin bridge transactions (#6705)
    • Handle Bitcoin PSBT (Partially Signed Bitcoin Transaction) format in trade data
    • Support Bitcoin transaction submission through unified Snap interface

Changed

  • BREAKING: Update transaction submission to use new unified Snap interface for all non-EVM chains (#6705)
    • Replace signAndSendTransactionWithoutConfirmation with ClientRequest:signAndSendTransaction method for Snap communication
    • This changes the expected Snap interface but maintains backward compatibility through response handling
  • Export handleSolanaTxResponse as an alias for handleNonEvmTxResponse for backward compatibility (deprecated) (#6705)
  • Rename createClientTransactionRequest from signAndSendTransactionRequest for clarity (#6705)

Removed

  • Remove direct dependency on @metamask/keyring-api (#6705)

Fixed

  • Fix invalid fallback chain ID for non-EVM chains in transaction metadata (#6705)
    • Changed from invalid 0x0 to 0x1 as temporary workaround for activity list display

Changed

  • Bump @metamask/bridge-controller from ^44.0.1 to ^45.0.0 (#6716, #6629)

Changed

  • Revert accidental breaking changes included in v44.0.0 (#6454)
  • Refactor handleLineaDelay to handleApprovalDelay for improved abstraction and add support for Base chain by using an array and includes for chain ID checks (#6674)

44.0.0 [DEPRECATED]

Changed

  • This version was deprecated because it accidentally included additional breaking changes; use v44.1.0 or later versions instead
  • BREAKING: Bump peer dependency @metamask/bridge-controller from ^43.0.0 to ^44.0.0 (#6652, #6676)

Added

  • Add new controller metadata properties to BridgeStatusController (#6589)

Changed

  • Bump @metamask/controller-utils from ^11.12.0 to ^11.14.0 (#6620, #6629)
  • Bump @metamask/base-controller from ^8.3.0 to ^8.4.0 (#6632)

Changed

  • BREAKING: Bump @metamask/bridge-controller peer dependency from ^42.0.0 to ^43.0.0 (#6612)
  • Bump @metamask/keyring-api from ^20.1.0 to ^21.0.0 (#6560)
  • Bump @metamask/utils from ^11.4.2 to ^11.8.0 (#6588)

Added

  • Add getBridgeHistoryItemByTxMetaId method available via messaging system for external access to bridge history items (#6363)
  • Add gas_included_7702 field to metrics tracking for EIP-7702 gasless transactions (#6363)

Changed

  • BREAKING: Bump @metamask/bridge-controller peer dependency from ^41.0.0 to ^42.0.0 (#6476)
  • Bump @metamask/base-controller from ^8.2.0 to ^8.3.0 (#6465)
  • Pass the isGasFeeIncluded parameter through transaction utilities (#6363)

Fixed

  • Set the Solana tx signature as the txHistory key to support lookups by hash (#6424)
  • Read Completed swap properties from txHistory for consistency with bridge transactions (#6424)

Added

  • Publish StatusValidationFailed event for invalid getTxStatus responses (#6362)

Changed

  • Bump @metamask/base-controller from ^8.1.0 to ^8.2.0 (#6355)

Added

  • Add getBridgeHistoryItemByTxMetaId method to retrieve bridge history items by their transaction meta ID (#6346)
  • Add support for EIP-7702 gasless transactions in transaction batch handling (#6346)

Changed

  • BREAKING: Bump peer dependency @metamask/bridge-controller from ^40.0.0 to ^41.0.0 (#6350)
  • Calculate actual_time_minutes event property based on txMeta.time if available (#6314)
  • Parse event properties from the quote request if an event needs to be published prior to tx submission (i.e., Failed, Submitted) (#6314)
  • Update transaction batch handling to conditionally enable EIP-7702 based on quote's gasless7702 flag (#6346)

Changed

  • BREAKING: Bump peer dependency @metamask/accounts-controller from ^32.0.0 to ^33.0.0 (#6345)
  • BREAKING: Bump peer dependency @metamask/bridge-controller from ^39.0.0 to ^40.0.0 (#6345)
  • BREAKING: Bump peer dependency @metamask/transaction-controller from ^59.0.0 to ^60.0.0 (#6345)
  • Bump accounts related packages (#6309)
    • Bump @metamask/keyring-api from ^20.0.0 to ^20.1.0

Changed

  • Add quotedGasAmount to txHistory (#6299)

Fixed

  • Parse destination amount from Swap EVM tx receipt and use it to calculate finalized tx event properties (#6299)
  • Use status.destChain.amount from getTxStatus response to calculate actual bridged amount (#6299)

Changed

  • Bump @metamask/controller-utils from ^11.11.0 to ^11.12.0 (#6303)

Fixed

  • Wait for Mobile hardware wallet delay before submitting Ledger tx (#6302)

Added

  • Include assetsFiatValue for sending and receiving assets in batch transaction request parameters (#6277)

Changed

  • BREAKING: Bump peer dependency @metamask/bridge-controller to ^38.0.0 (#6268)
  • Hardcode action_type to swapbridge-v1 after swaps and bridge unification (#6270)
  • Bump @metamask/base-controller from ^8.0.1 to ^8.1.0 (#6284)
  • Store the quote's effective gas fees as the quotedGasInUsd in txHistory; fallback to the total fees otherwise (#6295)

Changed

  • Bump @metamask/keyring-api from ^19.0.0 to ^20.0.0 (#6248)

Fixed

  • Make sure to pass the requireApproval for ERC20 approvals (#6204)

Changed

  • BREAKING: Bump peer dependency @metamask/accounts-controller to ^32.0.0 (#6171)
  • BREAKING: Bump peer dependency @metamask/bridge-controller to ^37.0.0 (#6171)
  • BREAKING: Bump peer dependency @metamask/transaction-controller to ^59.0.0, (#6171, #6027)

Added

  • Add restartPollingForFailedAttempts action to restart polling for txs that are not in a final state but have too many failed attempts (#6149)

Changed

  • Bump @metamask/keyring-api from ^18.0.0 to ^19.0.0 (#6146)

Fixed

  • Don't poll indefinitely for bridge tx status if the tx is not found. Implement exponential backoff to prevent overwhelming the bridge API. (#6149)

Changed

  • Bump @metamask/bridge-controller to ^36.0.0 (#6120)

Changed

  • BREAKING: Bump peer dependency @metamask/bridge-controller to ^35.0.0 (#6098)
  • BREAKING Submit Solana transactions using onClientRequest RPC call by default, which hides the Snap confirmation page from clients. Clients will need to remove conditional redirect the the confirmation page on tx submission (#6077)
  • Bump @metamask/controller-utils from ^11.10.0 to ^11.11.0 (#6069)
  • Bump @metamask/utils from ^11.2.0 to ^11.4.2 (#6054)

Added

  • Add batchId to BridgeHistoryItem to enable querying history by batchId (#6058)

Changed

  • BREAKING Add tx batching functionality, which requires an addTransactionBatchFn handler to be passed to the BridgeStatusController's constructor (#6058)
  • BREAKING Update batched txs after signing with correct tx types, which requires an updateTransactionFn handler to be passed to the BridgeStatusController's constructor (#6058)
  • Add approvalTxId to txHistoryItem after signing batched transaction (#6058)
  • Remove addUserOperationFromTransaction tx submission code and constructor arg since it is unsupported (#6057)
  • Remove @metamask/user-operation-controller dependency (#6057)
  • BREAKING: Bump peer dependency @metamask/snaps-controllers from ^12.0.0 to ^14.0.0 (#6035)

Fixed

  • Wait until a bridge transaction is confirmed before polling for its status. This reduces (or fully removes) premature getTxStatus calls, and enables adding batched bridge txs to history before its transaction Id is available (#6052)

Changed

  • Consolidate validator and type definitions for StatusResponse so new response fields only need to be defined once (#6030)

Removed

  • Clean up unused exports that duplicate @metamask/bridge-controller's (#6030)
    • Asset
    • SrcChainStatus
    • DestChainStatus
    • RefuelData
    • FeeType
    • ActionTypes

Fixed

  • Set event property gas_included to quote's gasIncluded value (#6030)
  • Set StatusResponse ChainId schema to expect a number instead of a string (#6045)

Changed

  • Remove @metamask/multichain-transactions-controller peer dependency (#5993)

Fixed

  • Update the following events to match the Unified SwapBridge spec (#5993)
    • Completed: remove multichain tx controller subscription and emit the event based on the tx submission status instead
    • Failed: emit event when an error is thrown during solana tx submission
    • Submitted
      • set swap type for evm txs when applicable. this is currently hardcoded to bridge so swaps don't get displayed correctly on the activity list
      • emit this event when submitTx is called, regardless of confirmation status

Changed

  • BREAKING: Adds a call to bridge-controller's stopPollingForQuotes handler to prevent quotes from refreshing during tx submission. This enables "pausing" the quote polling loop without resetting the entire state. Without this, it's possible for the activeQuote to change while the UI's tx submission is in-progress (#5994)
  • BREAKING: BridgeStatusController now requires the BridgeController:stopPollingForQuotes action permission (#5994)
  • BREAKING: Bump peer dependency @metamask/accounts-controller to ^31.0.0 (#5999)
  • BREAKING: Bump peer dependency @metamask/bridge-controller to ^33.0.0 (#5999)
  • BREAKING: Bump peer dependency @metamask/gas-fee-controller to ^24.0.0 (#5999)
  • BREAKING: Bump peer dependency @metamask/multichain-transactions-controller to ^3.0.0 (#5999)
  • BREAKING: Bump peer dependency @metamask/network-controller to ^24.0.0 (#5999)
  • BREAKING: Bump peer dependency @metamask/transaction-controller to ^58.0.0 (#5999)
  • Bump @metamask/polling-controller to ^14.0.0 (#5999)
  • Bump @metamask/user-operation-controller to ^37.0.0 (#5999)

Fixed

  • Parse tx signature from onClientRequest response in order to identify bridge transactions (#6001)
  • Prevent active quote from changing while transaction submission is in progress (#5994)

Changed

  • BREAKING: Implement onClientRequest for Solana snap transactions, now requires action permission for RemoteFeatureFlagController:getState (#5961)

Changed

  • Bump @metamask/bridge-controller to ^32.1.2 (#5969)
  • Bump @metamask/controller-utils to ^11.10.0 (#5935)
  • Bump @metamask/transaction-controller to ^57.3.0 (#5954)

Fixed

  • Properly prompt for confirmation on Ledger on Mobile for bridge transactions (#5931)

Added

  • Include all invalid status properties in sentry logs (#5913)

Changed

  • BREAKING: Bump @metamask/bridge-controller peer dependency to ^32.0.0 (#5896)

Changed

  • BREAKING: Bump @metamask/bridge-controller peer dependency to ^31.0.0 (#5894)

Changed

  • BREAKING: Bump @metamask/accounts-controller peer dependency to ^30.0.0 (#5888)
  • BREAKING: Bump @metamask/bridge-controller peer dependency to ^30.0.0 (#5888)
  • BREAKING: Bump @metamask/transactions-controller peer dependency to ^57.0.0 (#5888)
  • BREAKING: Bump @metamask/multichain-transactions-controller peer dependency to ^2.0.0 (#5888)
  • BREAKING: Bump @metamask/snaps-controllers peer dependency from ^11.0.0 to ^12.0.0 (#5871)
  • Bump @metamask/keyring-api dependency from ^17.4.0 to ^18.0.0 (#5871)

Changed

  • BREAKING: Bump @metamask/bridge-controller peer dependency to ^29.0.0 (#5872)

Changed

  • BREAKING: Bump @metamask/bridge-controller peer dependency to ^28.0.0 (#5863)

Changed

  • BREAKING: Bump @metamask/bridge-controller peer dependency to ^27.0.0 (#5845)

Added

  • Subscribe to TransactionController and MultichainTransactionsController tx confirmed and failed events for swaps (#5829)

Changed

  • BREAKING: bump @metamask/bridge-controller peer dependency to ^26.0.0 (#5842)
  • BREAKING: Remove the published bridgeTransactionComplete and bridgeTransactionFailed events (#5829)
  • Modify events to use swap and swapApproval TransactionTypes when src and dest chain are the same (#5829)

Added

  • Subscribe to TransactionController and MultichainTransactionsController tx confirmed and failed events for swaps (#5829)
  • Error logs for invalid getTxStatus responses (#5816)

Changed

  • BREAKING: Remove the published bridgeTransactionComplete and bridgeTransactionFailed events (#5829)
  • Modify events to use swap and swapApproval TransactionTypes when src and dest chain are the same (#5829)
  • Bump @metamask/bridge-controller dev dependency to ^25.0.1 (#5811)
  • Bump @metamask/controller-utils to ^11.9.0 (#5812)

Fixed

  • Don't start or restart getTxStatus polling if transaction is a swap (#5831)

Changed

  • BREAKING: bump @metamask/accounts-controller peer dependency to ^29.0.0 (#5802)
  • BREAKING: bump @metamask/bridge-controller peer dependency to ^25.0.0 (#5802)
  • BREAKING: bump @metamask/transaction-controller peer dependency to ^56.0.0 (#5802)

Added

  • Sentry traces for Swap and Bridge TransactionApprovalCompleted and TransactionCompleted events (#5780)

Changed

  • traceFn added to BridgeStatusController constructor to enable clients to pass in a custom sentry trace handler (#5768)

Changed

  • BREAKING: Bump @metamask/bridge-controller peer dependency to ^23.0.0 (#5795)
  • Replace bridgePriceData with priceData from QuoteResponse object (#5784)

Changed

  • BREAKING: Bump @metamask/bridge-controller peer dependency to ^22.0.0 (#5780)
  • Bump @metamask/controller-utils to ^11.8.0 (#5765)

Changed

  • BREAKING: Bump @metamask/bridge-controller peer dependency to ^21.0.0 (#5763)
  • BREAKING: Bump @metamask/accounts-controller peer dependency to ^28.0.0 (#5763)
  • BREAKING: Bump @metamask/transaction-controller peer dependency to ^55.0.0 (#5763)

Fixed

  • Added a hardcoded SolScope.Mainnet value to ensure the signAndSendTransaction params are always valid. Discovered Solana accounts may have an undefined options.scope, which causes handleRequest calls to throw a JSON-RPC validation error ([#5750])(MetaMask#5750)

Changed

  • Includes submitted quote's priceImpact as a property in analytics events (#5721)
  • Bump @metamask/base-controller from ^8.0.0 to ^8.0.1 (#5722)
  • BREAKING: Bump @metamask/bridge-controller peer dependency to ^20.0.0 (#5717)

Changed

  • BREAKING: Bump @metamask/bridge-controller peer dependency to ^19.0.0 (#5717)
  • Remove @metamask/assets-controllers peer dependency (#5716)

Fixed

  • Fixes transaction polling failures caused by adding tokens with the incorrect account address to the TokensControler (#5716)

Changed

  • BREAKING: Bump @metamask/assets-controllers peer dependency to ^59.0.0 (#5712)
  • BREAKING: Bump @metamask/bridge-controller peer dependency to ^18.0.0 (#5712)

Added

  • BREAKING: Add analytics tracking for post-tx submission events (#5684)
  • Add optional isStxEnabled property to BridgeHistoryItem to indicate whether the transaction was submitted as a smart transaction (#5684)

Changed

  • BREAKING: Bump @metamask/bridge-controller peer dependency to ^17.0.0 (#5700)

Fixed

  • Fixes missing EVM native exchange rates by not lowercasing the symbol used for lookups (#5696)
  • Fixes occasional snap handleRequest errors by setting the request scope to SolScope.Mainnet instead of reading it from the account metadata (#5696)

Fixed

  • Add optional approvalTxId to BridgeHistoryItem to prevent transaction metadata corruption (#5670)
    • Fixes issue where updateTransaction was overwriting transaction metadata when associating approvals
    • Stores approval transaction ID in bridge history instead of modifying transaction metadata
    • Reduces duplicate quote data in state

Added

  • BREAKING: Add @metamask/snaps-controllers peer dependency at ^11.0.0 (#5634, #5639)
  • BREAKING: Add @metamask/gas-fee-controller peer dependency at ^23.0.0 (#5643)
  • BREAKING: Add @metamask/assets-controllers peer dependency at ^58.0.0 (#5643, #5672)
  • Add @metamask/user-operation-controller dependency at ^33.0.0 (#5643)
  • Add uuid dependency at ^8.3.2 (#5634)
  • Add @metamask/keyring-api dependency at ^17.4.0 (#5643)
  • Add bignumber.js dependency at ^9.1.2 (#5643)
  • Add submitTx handler that submits cross-chain swaps transactions and triggers polling for destination transaction status (#5634)
  • Enable submitting EVM transactions using submitTx (#5643)
  • Add functionality for importing tokens from transaction after successful confirmation (#5643)

Changed

  • BREAKING Change @metamask/bridge-controller from dependency to peer dependency and bump to ^16.0.0 (#5657, #5665, #5643, #5672)
  • Add optional config.customBridgeApiBaseUrl constructor arg to set the bridge-api base URL (#5634)
  • Add required addTransactionFn and estimateGasFeeFn args to the BridgeStatusController constructor to enable calling TransactionController's methods from submitTx (#5643)
  • Add optional addUserOperationFromTransactionFn arg to the BridgeStatusController constructor to enable submitting txs from smart accounts using the UserOperationController's addUserOperationFromTransaction method (#5643)

Fixed

  • Update validators to accept any bridge string in the StatusResponse (#5634)

Fixed

  • Add relay to the list of bridges in the BridgeId enum to prevent validation from failing (#5623)

Changed

  • BREAKING: Bump @metamask/transaction-controller peer dependency to ^54.0.0 (#5615)

Changed

  • BREAKING: Bump @metamask/transaction-controller peer dependency to ^53.0.0 (#5585)
  • Bump @metamask/bridge-controller dependency to ^11.0.0 (#5525)
  • BREAKING: Change controller to fetch multichain address instead of EVM (#5554)

Changed

  • BREAKING: Bump @metamask/transaction-controller peer dependency to ^52.0.0 (#5513)
  • Bump @metamask/bridge-controller peer dependency to ^10.0.0 (#5513)

Changed

  • BREAKING: Bump peer dependency @metamask/accounts-controller to ^27.0.0 (#5507)
  • BREAKING: Bump peer dependency @metamask/network-controller to ^23.0.0 (#5507)
  • BREAKING: Bump peer dependency @metamask/transaction-controller to ^51.0.0 (#5507)
  • Bump @metamask/bridge-controller to ^9.0.0 (#5507)
  • Bump @metamask/polling-controller to ^13.0.0 (#5507)

Changed

  • BREAKING: Bump @metamask/transaction-controller peer dependency to ^50.0.0 (#5496)

Changed

  • Bump @metamask/accounts-controller dev dependency to ^26.1.0 (#5481)
  • BREAKING: Allow changing the Bridge API url through the config param in the constructor. Remove previous method of doing it through process.env. (#5465)

Fixed

  • @metamask/bridge-controller dependency is no longer a peer dependency, just a direct dependency (#5464)

Changed

  • BREAKING: Bump @metamask/transaction-controller peer dependency to ^49.0.0 (#5471)

Changed

  • BREAKING: Bump @metamask/accounts-controller peer dependency to ^26.0.0 (#5439)
  • BREAKING: Bump @metamask/transaction-controller peer dependency to ^48.0.0 (#5439)
  • BREAKING: Bump @metamask/bridge-controller peer dependency to ^5.0.0 (#5439)

Changed

  • BREAKING: Bump @metamask/accounts-controller peer dependency to ^25.0.0 (#5426)
  • BREAKING: Bump @metamask/transaction-controller peer dependency to ^47.0.0 (#5426)
  • BREAKING: Bump @metamask/bridge-controller peer dependency to ^4.0.0 (#5426)

Changed

  • BREAKING: Bump @metamask/bridge-controller to v3.0.0
  • Improve BridgeStatusController API response validation readability by using @metamask/superstruct (#5408)

Changed

  • BREAKING: Change BridgeStatusController state structure to have all fields at root of state (#5406)
  • BREAKING: Redundant type BridgeStatusState removed from exports (#5406)

Added

  • Initial release (#5317)