Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions packages/bridge-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Add `gasIncluded` and `gasIncluded7702` to `BatchSellTradesResponseSchema`

### Changed

- Bump `@metamask/assets-controller` from `^8.0.0` to `^8.0.1` ([#8874](https://github.com/MetaMask/core/pull/8874))
Expand All @@ -21,6 +25,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Fix `calcSentAmount` double-counting fees for intent-based swap quotes ([#8845](https://github.com/MetaMask/core/pull/8845))

### Removed

- **BREAKING**: Deprecate `BridgeUserAction` and `BridgeBackgroundAction` enums

## [73.0.0]

### Added
Expand Down
2 changes: 0 additions & 2 deletions packages/bridge-controller/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ export {
SortOrder,
ChainId,
RequestStatus,
BridgeUserAction,
BridgeBackgroundAction,
type TokenFeature,
type QuoteStreamCompleteData,
type BridgeControllerGetStateAction,
Expand Down
21 changes: 0 additions & 21 deletions packages/bridge-controller/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,27 +361,6 @@ export enum RequestStatus {
ERROR = 2,
}

/**
* @deprecated Use the separate method action types (e.g.,
* `BridgeControllerFetchQuotesAction`) instead.
*/
export enum BridgeUserAction {
SELECT_DEST_NETWORK = 'selectDestNetwork',
UPDATE_QUOTE_PARAMS = 'updateBridgeQuoteRequestParams',
}

/**
* @deprecated Use the separate method action types (e.g.,
* `BridgeControllerFetchQuotesAction`) instead.
*/
export enum BridgeBackgroundAction {
SET_CHAIN_INTERVAL_LENGTH = 'setChainIntervalLength',
RESET_STATE = 'resetState',
TRACK_METAMETRICS_EVENT = 'trackUnifiedSwapBridgeEvent',
STOP_POLLING_FOR_QUOTES = 'stopPollingForQuotes',
FETCH_QUOTES = 'fetchQuotes',
}

export type BridgeControllerState = {
quoteRequest: Partial<GenericQuoteRequest>[];
quotes: (QuoteResponse & L1GasFees & NonEvmFees)[];
Expand Down
33 changes: 18 additions & 15 deletions packages/bridge-controller/src/utils/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -547,21 +547,24 @@ export const SimulatedGasFeeLimitsSchema = type({
maxPriorityFeePerGas: HexStringSchema,
});

export const BatchSellTradesResponseSchema = type({
transactions: array(
intersection([
TxDataSchema,
SimulatedGasFeeLimitsSchema,
type({ type: enums(Object.values(BatchSellTransactionType)) }),
]),
),
fee: optional(
type({
asset: BridgeAssetSchema,
amount: NumberStringSchema,
}),
),
});
export const BatchSellTradesResponseSchema = intersection([
type({
transactions: array(
intersection([
TxDataSchema,
SimulatedGasFeeLimitsSchema,
type({ type: enums(Object.values(BatchSellTransactionType)) }),
]),
),
fee: optional(
type({
asset: BridgeAssetSchema,
amount: NumberStringSchema,
}),
),
}),
GaslessPropertiesSchema,
]);

export const validateBatchSellTradesResponse = (
data: unknown,
Expand Down
1 change: 1 addition & 0 deletions packages/bridge-status-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Refactor tx submission into strategies to reduce quote-specific branching in the controller, and to de-duplicate shared logic between `submitTx` and `submitIntent`. Each strategy yields payloads that the controller uses to update history, poll, and publish metrics ([#8257](https://github.com/MetaMask/core/pull/8257))
- Remove `BridgeUserAction` and `BridgeBackgroundAction` usages
- Bump `@metamask/bridge-controller` from `^72.0.4` to `^73.0.1` ([#8850](https://github.com/MetaMask/core/pull/8850), [#8866](https://github.com/MetaMask/core/pull/8866))
- Remove unnecessary type assertions for bridge quotes ([#8805](https://github.com/MetaMask/core/pull/8805))

Expand Down
Loading
Loading