Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
158b79f
wip
micaelae Jul 30, 2026
06bb224
Revert "wip"
micaelae Jul 30, 2026
3397c50
feat: v2 schema
micaelae Jul 30, 2026
267d7f3
feat: V2 coercers
micaelae Jul 30, 2026
c4fc87c
chore: calcQuoteMetadata V1/V2
micaelae Jul 31, 2026
3cc46f9
chore: V1/V2 appendL1GasFees (breaking)
micaelae Jul 31, 2026
68d7b18
feat: update bridge-status
micaelae Jul 31, 2026
a5b9cb2
feat: save quotes as V2 (breaking)
micaelae Jul 31, 2026
e9fc1d7
chore: changelog
micaelae Jul 31, 2026
d178568
Merge branch 'swaps4546-v2-schema' into swaps4546-v2-coercers
micaelae Jul 31, 2026
0b11176
wip
micaelae Jul 31, 2026
4b51f91
fix: tests
micaelae Aug 3, 2026
3118a05
coercers
micaelae Aug 3, 2026
3464107
v2
micaelae Aug 3, 2026
66750d1
v2
micaelae Aug 3, 2026
c0166df
coercers
micaelae Aug 3, 2026
370fb4d
Merge branch 'main' into swaps4546-v2-schema
micaelae Aug 3, 2026
65b56a2
Merge branch 'swaps4546-v2-schema' into swaps4546-v2-coercers
micaelae Aug 3, 2026
37a4e32
Merge branch 'swaps4546-v2-coercers' into swaps4546-v2-metadata
micaelae Aug 3, 2026
7dff48b
Merge branch 'swaps4546-v2-metadata' into swaps4546-v2-controller-update
micaelae Aug 3, 2026
78daacc
Merge branch 'swaps4546-v2-controller-update' into swaps4547-use-v2-m…
micaelae Aug 3, 2026
f229640
fix: lint
micaelae Aug 3, 2026
f4fb464
fix: test coverage
micaelae Aug 3, 2026
68adec3
Merge branch 'swaps4546-v2-coercers' into swaps4546-v2-metadata
micaelae Aug 3, 2026
48b9858
fix: build
micaelae Aug 3, 2026
061c632
Merge branch 'swaps4546-v2-metadata' into swaps4546-v2-controller-update
micaelae Aug 3, 2026
cbdee5c
Merge branch 'swaps4546-v2-controller-update' into swaps4547-use-v2-m…
micaelae Aug 3, 2026
eeb0a73
chore: changelog
micaelae Aug 3, 2026
77ff887
chore: changelog
micaelae Aug 3, 2026
545f2d9
Merge branch 'swaps4546-v2-metadata' into swaps4546-v2-controller-update
micaelae Aug 3, 2026
17102ef
chore: changelog
micaelae Aug 3, 2026
83e453f
fix: lint
micaelae Aug 3, 2026
0762493
Merge branch 'swaps4546-v2-controller-update' into swaps4547-use-v2-m…
micaelae Aug 3, 2026
60e0d4c
fix: changelog
micaelae Aug 3, 2026
7321ae0
chore: undo Stellar testnet removal
micaelae Aug 3, 2026
8bd9439
chore: update comment
micaelae Aug 3, 2026
e8b7fa7
chore: rename NumberStringSchema -> PositiveNumberStringSchema
micaelae Aug 3, 2026
a4a3a88
Merge branch 'swaps4546-v2-controller-update' into swaps4547-use-v2-m…
micaelae Aug 3, 2026
80cd0e7
Merge branch 'swaps4546-v2-schema' into swaps4546-v2-coercers
micaelae Aug 3, 2026
c421f64
Merge branch 'main' into swaps4546-v2-coercers
micaelae Aug 3, 2026
a32b3eb
wip
micaelae Aug 3, 2026
81307ec
fix: intent
micaelae Aug 3, 2026
c9d2666
fix: priceImpact
micaelae Aug 3, 2026
3d460fc
fix: coverage
micaelae Aug 3, 2026
6644859
Merge branch 'swaps4546-v2-coercers' into swaps4546-v2-metadata
micaelae Aug 3, 2026
74d3476
Merge branch 'swaps4546-v2-metadata' into swaps4546-v2-controller-update
micaelae Aug 3, 2026
f2f3773
Merge branch 'swaps4546-v2-controller-update' into swaps4547-use-v2-m…
micaelae Aug 3, 2026
1944dca
chore: unit tests
micaelae Aug 4, 2026
9d78417
fix: rm vscode file
micaelae Aug 4, 2026
3dcc995
fix: lint
micaelae Aug 4, 2026
c388297
Merge branch 'main' into swaps4546-v2-coercers
micaelae Aug 4, 2026
03be8a6
refactor: rename token amount formatters
micaelae Aug 4, 2026
bfede7a
fix: export sumAmounts
micaelae Aug 4, 2026
157df42
fix: changelog
micaelae Aug 4, 2026
cda6f82
chore: remove unused vars
micaelae Aug 4, 2026
466cc59
chore: rm unknown types
micaelae Aug 4, 2026
505eb45
Merge branch 'swaps4546-v2-coercers' into swaps4546-v2-metadata
micaelae Aug 4, 2026
6d59cbc
Merge branch 'swaps4546-v2-metadata' into swaps4546-v2-controller-update
micaelae Aug 4, 2026
f61417e
Merge branch 'main' into swaps4546-v2-coercers
micaelae Aug 4, 2026
f9fff64
fix: duplicate export
micaelae Aug 4, 2026
9e07537
chore: restore unknown
micaelae Aug 4, 2026
4fa3a23
Merge branch 'swaps4546-v2-coercers' into swaps4546-v2-metadata
micaelae Aug 4, 2026
c1495b5
Merge branch 'swaps4546-v2-metadata' into swaps4546-v2-controller-update
micaelae Aug 4, 2026
977b7a8
fix: import + lint
micaelae Aug 4, 2026
8eaf165
Merge branch 'swaps4546-v2-metadata' into swaps4546-v2-controller-update
micaelae Aug 4, 2026
8b8ca16
chore: changelog
micaelae Aug 4, 2026
2d0732a
Merge branch 'swaps4546-v2-metadata' into swaps4546-v2-controller-update
micaelae Aug 4, 2026
aa5c5d2
chore: minAmount fallback
micaelae Aug 4, 2026
6997d7a
Merge branch 'main' into swaps4546-v2-metadata
micaelae Aug 4, 2026
b4cbd35
Merge branch 'swaps4546-v2-metadata' into swaps4546-v2-controller-update
micaelae Aug 4, 2026
21a8c36
Revert "chore: minAmount fallback"
micaelae Aug 4, 2026
a5a6e0d
Merge branch 'swaps4546-v2-metadata' into swaps4546-v2-controller-update
micaelae Aug 4, 2026
31b0948
chore: minAmount fallback
micaelae Aug 4, 2026
d5f4a99
fix: optional minDestTokenAmount (match backend)
micaelae Aug 4, 2026
a163bb1
fix: export AmountsAndAssetSchema
micaelae Aug 4, 2026
2571448
fix: changelog
micaelae Aug 4, 2026
1280f52
Merge branch 'main' into swaps4546-v2-controller-update
micaelae Aug 4, 2026
9c56b39
Merge branch 'swaps4546-v2-controller-update' into swaps4547-use-v2-m…
micaelae Aug 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions packages/bridge-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- **BREAKING:** Add `migrationPhase` to selector params, which determines how metadata is resolved ([#9744](https://github.com/MetaMask/core/pull/9744))
- Phase 1 omits V2 quoteMetadata derived from the quotes response. Legacy metadata is served to the clients
- Phase 1.5 includes V2 quoteMetadata but falls back to legacy metadata
- Phase 2 omits legacy metadata from the quotes and enables removal of deprecated metadata utils
- **BREAKING:** Use QuoteResponse V2 within the BridgeController; this affects the batch-sell, unified swap/bridge and quickBuy experiences ([#9726](https://github.com/MetaMask/core/pull/9726))
- convert quotes to QuoteResponse v2 in `fetchBridgeQuoteStream`
- store quotes as QuoteResponse v2 in the BridgeController
- `QuoteResponse` export now means v2; v1 is still exported as `QuoteResponseV1`
- `fetchBridgeQuoteStream` and `fetchBatchSellTrades` now return `QuoteResponse` v2
- `fetchBatchSellTrades` expects V2 quotes, then transforms them to V1 for backend compatibility
- **BREAKING:** `appendFeesToQuotes` interface now requires a chainId parameter, but still accepts both V1 and V2 quotes ([#9726](https://github.com/MetaMask/core/pull/9726))
- Update `calcQuoteMetadata` util to handle both V1 and V2 quotes. Legacy metadata calculators continue to use the V1 schema ([#9727](https://github.com/MetaMask/core/pull/9727))
- Bump `@metamask/transaction-controller` from `^69.4.0` to `^69.5.0` ([#9780](https://github.com/MetaMask/core/pull/9780))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,15 @@ exports[`BridgeController SSE should publish validation failures 4`] = `
"chain_id_destination": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
"chain_id_source": "eip155:1",
"failures": [
"lifi|trade",
"lifi|trade.chainId",
"lifi|trade.to",
"lifi|trade.from",
"lifi|trade.value",
"lifi|trade.data",
"lifi|trade.gasLimit",
"lifi|trade.unsignedPsbtBase64",
"lifi|trade.inputsToSign",
"lifi|trade.raw_data_hex",
"lifi|trade.xdrBase64",
"lifi|trade.xdr",
"lifi|quote.src",
"lifi|quote.dest",
"lifi|quote.feeData.metabridge",
"lifi|quote.aggregator",
"lifi|quote.protocols",
"lifi|quote.steps.0.src",
"lifi|quote.steps.0.dest",
"lifi|quote.steps.1.src",
"lifi|quote.steps.1.dest",
],
"feature_id": "unified_swap_bridge",
"location": "Unknown",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@ import type {
} from '@metamask/messenger';

import { flushPromises } from '../../../tests/helpers.js';
import { mockBridgeQuotesErc20Erc20V1 } from '../tests/mock-quotes-erc20-erc20.js';
import { mockBridgeQuotesNativeErc20V1 } from '../tests/mock-quotes-native-erc20.js';
import {
getMockBridgeQuotesErc20Erc20V2,
mockBridgeQuotesErc20Erc20V1,
} from '../tests/mock-quotes-erc20-erc20.js';
import {
getMockBridgeQuotesNativeErc20V2,
mockBridgeQuotesNativeErc20V1,
} from '../tests/mock-quotes-native-erc20.js';
import {
advanceToNthTimerThenFlush,
mockSseBatchSellEventSource,
Expand Down Expand Up @@ -419,7 +425,7 @@ describe('BridgeController BatchSell (multiple quote requests) SSE', function ()
resetApproval: false,
},
],
quotes: mockBridgeQuotesNativeErc20V1
quotes: getMockBridgeQuotesNativeErc20V2()
.map((quote) => ({
...quote,
l1GasFeesInHexWei: '0x1',
Expand All @@ -428,13 +434,15 @@ describe('BridgeController BatchSell (multiple quote requests) SSE', function ()
featureId: FeatureId.BATCH_SELL,
}))
.concat(
mockBridgeQuotesErc20Erc20V1.map((quote) => ({
...quote,
l1GasFeesInHexWei: '0x2',
resetApproval: undefined,
quoteRequestIndex: 1,
featureId: FeatureId.BATCH_SELL,
})),
getMockBridgeQuotesErc20Erc20V2({ quoteRequestIndex: 1 }).map(
(quote) => ({
...quote,
l1GasFeesInHexWei: '0x2',
resetApproval: undefined,
quoteRequestIndex: 1,
featureId: FeatureId.BATCH_SELL,
}),
),
),
quotesRefreshCount: 1,
quotesLoadingStatus: 1,
Expand Down Expand Up @@ -642,7 +650,7 @@ describe('BridgeController BatchSell (multiple quote requests) SSE', function ()
);
await rootMessenger.call(
'BridgeController:updateBatchSellTrades',
mockBridgeQuotesErc20Erc20V1,
getMockBridgeQuotesErc20Erc20V2(),
false,
);

Expand Down Expand Up @@ -682,7 +690,7 @@ describe('BridgeController BatchSell (multiple quote requests) SSE', function ()
'13.8.0',
]);
expect(fetchBatchSellTradesSpy.mock.calls[1]).toStrictEqual([
mockBridgeQuotesErc20Erc20V1,
getMockBridgeQuotesErc20Erc20V2(),
false,
expect.any(AbortSignal),
'extension',
Expand Down Expand Up @@ -879,7 +887,7 @@ describe('BridgeController BatchSell (multiple quote requests) SSE', function ()
// 2nd fetch
await rootMessenger.call(
'BridgeController:updateBatchSellTrades',
mockBridgeQuotesErc20Erc20V1,
getMockBridgeQuotesErc20Erc20V2(),
false,
);

Expand All @@ -889,7 +897,7 @@ describe('BridgeController BatchSell (multiple quote requests) SSE', function ()
expect(stopAllPollingSpy).toHaveBeenCalledTimes(0);
expect(abortControllerSpy).toHaveBeenCalledTimes(1);
expect(fetchBatchSellTradesSpy.mock.calls[1][0]).toStrictEqual(
mockBridgeQuotesErc20Erc20V1,
getMockBridgeQuotesErc20Erc20V2(),
);
expect(startPollingSpy).not.toHaveBeenCalled();
expect(bridgeController.state.batchSellTrades).toBeNull();
Expand Down
Loading
Loading