Skip to content

Commit 1f8c7cc

Browse files
authored
chore: EVM swap tx submission and events (#5829)
## Explanation - marks swap transactions that go through the BridgeController as swaps - subscribes to tx confirmations and emits swap metrics <!-- Thanks for your contribution! Take a moment to answer these questions so that reviewers have the information they need to properly understand your changes: * What is the current state of things and why does it need to change? * What is the solution your changes offer and how does it work? * Are there any changes whose purpose might not obvious to those unfamiliar with the domain? * If your primary goal was to update one package but you found you had to update another one along the way, why did you do so? * If you had to upgrade a dependency, why did you do so? --> ## References Fixes https://consensyssoftware.atlassian.net/browse/MMS-2448 <!-- Are there any issues that this pull request is tied to? Are there other links that reviewers should consult to understand these changes better? Are there client or consumer pull requests to adopt any breaking changes? For example: * Fixes #12345 * Related to #67890 --> ## Changelog <!-- THIS SECTION IS NO LONGER NEEDED. The process for updating changelogs has changed. Please consult the "Updating changelogs" section of the Contributing doc for more. --> ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs), highlighting breaking changes as necessary - [x] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes
1 parent b989159 commit 1f8c7cc

12 files changed

+1920
-155
lines changed

packages/bridge-status-controller/CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- Subscribe to TransactionController and MultichainTransactionsController tx confirmed and failed events for swaps ([#5829](https://github.com/MetaMask/core/pull/5829))
13+
14+
### Changed
15+
16+
- **BREAKING:** Remove the published bridgeTransactionComplete and bridgeTransactionFailed events ([#5829](https://github.com/MetaMask/core/pull/5829))
17+
- Modify events to use `swap` and `swapApproval` TransactionTypes when src and dest chain are the same ([#5829](https://github.com/MetaMask/core/pull/5829))
18+
1019
## [22.0.0]
1120

1221
### Added
1322

23+
- Subscribe to TransactionController and MultichainTransactionsController tx confirmed and failed events for swaps ([#5829](https://github.com/MetaMask/core/pull/5829))
1424
- Error logs for invalid getTxStatus responses ([#5816](https://github.com/MetaMask/core/pull/5816))
1525

1626
### Changed
1727

18-
- Bump `@metamask/bridge-controller` peer dependency to `^25.0.1` ([#5811](https://github.com/MetaMask/core/pull/5811))
28+
- **BREAKING:** Remove the published bridgeTransactionComplete and bridgeTransactionFailed events ([#5829](https://github.com/MetaMask/core/pull/5829))
29+
- Modify events to use `swap` and `swapApproval` TransactionTypes when src and dest chain are the same ([#5829](https://github.com/MetaMask/core/pull/5829))
30+
- Bump `@metamask/bridge-controller` dev dependency to `^25.0.1` ([#5811](https://github.com/MetaMask/core/pull/5811))
1931
- Bump `@metamask/controller-utils` to `^11.9.0` ([#5812](https://github.com/MetaMask/core/pull/5812))
2032

2133
### Fixed

packages/bridge-status-controller/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
"@metamask/auto-changelog": "^3.4.4",
6363
"@metamask/bridge-controller": "^25.1.0",
6464
"@metamask/gas-fee-controller": "^23.0.0",
65+
"@metamask/multichain-transactions-controller": "^1.0.0",
6566
"@metamask/network-controller": "^23.5.0",
6667
"@metamask/snaps-controllers": "^11.2.1",
6768
"@metamask/transaction-controller": "^56.1.0",
@@ -80,6 +81,7 @@
8081
"@metamask/accounts-controller": "^29.0.0",
8182
"@metamask/bridge-controller": "^25.0.0",
8283
"@metamask/gas-fee-controller": "^23.0.0",
84+
"@metamask/multichain-transactions-controller": "^1.0.0",
8385
"@metamask/network-controller": "^23.0.0",
8486
"@metamask/snaps-controllers": "^11.0.0",
8587
"@metamask/transaction-controller": "^56.0.0"

0 commit comments

Comments
 (0)