Skip to content
Open
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
12 changes: 12 additions & 0 deletions packages/bridge-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Added `TrendingExplore` value to `MetaMetricsSwapsEventSource` enum for attributing swaps to the trending explore flow ([#7931](https://github.com/MetaMask/core/pull/7931))
- Added `location` as a required property on all Unified SwapBridge events in `RequiredEventContextFromClient` ([#7931](https://github.com/MetaMask/core/pull/7931))
- Added `setLocation()` method to `BridgeController` for clients to set the entry point when the flow starts ([#7931](https://github.com/MetaMask/core/pull/7931))
- Exported `MetaMetricsSwapsEventSource` from the package index ([#7931](https://github.com/MetaMask/core/pull/7931))

### Changed

- Updated `#getEventProperties` to fall back to stored `#location` when `location` is not provided by the client ([#7931](https://github.com/MetaMask/core/pull/7931))
- Replaced `@deprecated` tag on `MetaMetricsSwapsEventSource` with proper JSDoc description ([#7931](https://github.com/MetaMask/core/pull/7931))

## [66.1.1]

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ exports[`BridgeController SSE should publish validation failures 4`] = `
"lifi|trade.inputsToSign",
"lifi|trade.raw_data_hex",
],
"location": "Main View",
"refresh_count": 1,
"token_address_destination": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/token:123d1",
"token_address_source": "eip155:1/slip44:60",
Expand All @@ -34,6 +35,7 @@ exports[`BridgeController SSE should publish validation failures 4`] = `
"failures": [
"unknown|unknown",
],
"location": "Main View",
"refresh_count": 1,
"token_address_destination": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/token:123d1",
"token_address_source": "eip155:1/slip44:60",
Expand All @@ -48,6 +50,7 @@ exports[`BridgeController SSE should publish validation failures 4`] = `
"failures": [
"unknown|quote",
],
"location": "Main View",
"refresh_count": 1,
"token_address_destination": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/token:123d1",
"token_address_source": "eip155:1/slip44:60",
Expand All @@ -66,6 +69,7 @@ exports[`BridgeController SSE should replace all stale quotes after a refresh an
"custom_slippage": true,
"has_sufficient_funds": true,
"is_hardware_wallet": false,
"location": "Main View",
"security_warnings": [],
"slippage_limit": 0.5,
"stx_enabled": true,
Expand All @@ -91,6 +95,7 @@ exports[`BridgeController SSE should reset and refetch quotes after quote reques
"custom_slippage": true,
"has_sufficient_funds": true,
"is_hardware_wallet": false,
"location": "Main View",
"security_warnings": [],
"slippage_limit": 0.5,
"stx_enabled": true,
Expand All @@ -116,6 +121,7 @@ exports[`BridgeController SSE should reset quotes list if quote refresh fails 2`
"custom_slippage": true,
"has_sufficient_funds": true,
"is_hardware_wallet": false,
"location": "Main View",
"security_warnings": [],
"slippage_limit": 0.5,
"stx_enabled": true,
Expand All @@ -138,6 +144,7 @@ exports[`BridgeController SSE should reset quotes list if quote refresh fails 2`
"error_message": "Network error",
"has_sufficient_funds": true,
"is_hardware_wallet": false,
"location": "Main View",
"security_warnings": [],
"slippage_limit": 0.5,
"stx_enabled": true,
Expand Down Expand Up @@ -185,6 +192,7 @@ exports[`BridgeController SSE should rethrow error from server 3`] = `
"action_type": "swapbridge-v1",
"input": "chain_source",
"input_value": "eip155:1",
"location": "Main View",
},
],
[
Expand All @@ -193,6 +201,7 @@ exports[`BridgeController SSE should rethrow error from server 3`] = `
"action_type": "swapbridge-v1",
"input": "chain_destination",
"input_value": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
"location": "Main View",
},
],
[
Expand All @@ -201,6 +210,7 @@ exports[`BridgeController SSE should rethrow error from server 3`] = `
"action_type": "swapbridge-v1",
"input": "token_destination",
"input_value": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/token:123d1",
"location": "Main View",
},
],
[
Expand All @@ -209,6 +219,7 @@ exports[`BridgeController SSE should rethrow error from server 3`] = `
"action_type": "swapbridge-v1",
"input": "slippage",
"input_value": 0.5,
"location": "Main View",
},
],
[
Expand All @@ -220,6 +231,7 @@ exports[`BridgeController SSE should rethrow error from server 3`] = `
"custom_slippage": true,
"has_sufficient_funds": true,
"is_hardware_wallet": false,
"location": "Main View",
"security_warnings": [],
"slippage_limit": 0.5,
"stx_enabled": true,
Expand All @@ -242,6 +254,7 @@ exports[`BridgeController SSE should rethrow error from server 3`] = `
"error_message": "Bridge-api error: timeout from server",
"has_sufficient_funds": true,
"is_hardware_wallet": false,
"location": "Main View",
"security_warnings": [],
"slippage_limit": 0.5,
"stx_enabled": true,
Expand Down Expand Up @@ -289,6 +302,7 @@ exports[`BridgeController SSE should trigger quote polling if request is valid 2
"action_type": "swapbridge-v1",
"input": "chain_source",
"input_value": "eip155:1",
"location": "Main View",
},
],
[
Expand All @@ -297,6 +311,7 @@ exports[`BridgeController SSE should trigger quote polling if request is valid 2
"action_type": "swapbridge-v1",
"input": "chain_destination",
"input_value": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
"location": "Main View",
},
],
[
Expand All @@ -305,6 +320,7 @@ exports[`BridgeController SSE should trigger quote polling if request is valid 2
"action_type": "swapbridge-v1",
"input": "token_destination",
"input_value": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/token:123d1",
"location": "Main View",
},
],
[
Expand All @@ -313,6 +329,7 @@ exports[`BridgeController SSE should trigger quote polling if request is valid 2
"action_type": "swapbridge-v1",
"input": "slippage",
"input_value": 0.5,
"location": "Main View",
},
],
[
Expand All @@ -324,6 +341,7 @@ exports[`BridgeController SSE should trigger quote polling if request is valid 2
"custom_slippage": true,
"has_sufficient_funds": true,
"is_hardware_wallet": false,
"location": "Main View",
"security_warnings": [],
"slippage_limit": 0.5,
"stx_enabled": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ exports[`BridgeController trackUnifiedSwapBridgeEvent bridge-status-controller c
"has_gas_included_quote": false,
"initial_load_time_all_quotes": 0,
"is_hardware_wallet": false,
"location": "Main View",
"price_impact": 0,
"provider": "provider_bridge",
"quoted_time_minutes": 0,
Expand Down Expand Up @@ -145,6 +146,7 @@ exports[`BridgeController trackUnifiedSwapBridgeEvent bridge-status-controller c
"has_gas_included_quote": false,
"initial_load_time_all_quotes": 0,
"is_hardware_wallet": false,
"location": "Main View",
"price_impact": 12,
"provider": "provider_bridge",
"quoted_time_minutes": 2,
Expand Down Expand Up @@ -177,6 +179,7 @@ exports[`BridgeController trackUnifiedSwapBridgeEvent bridge-status-controller c
"failures": [
"Failed to submit tx",
],
"location": "Main View",
},
],
]
Expand Down Expand Up @@ -224,6 +227,7 @@ exports[`BridgeController trackUnifiedSwapBridgeEvent client-side calls should t
"has_gas_included_quote": false,
"initial_load_time_all_quotes": 0,
"is_hardware_wallet": false,
"location": "Main View",
"price_impact": 6,
"quotes_count": 0,
"quotes_list": [],
Expand Down Expand Up @@ -254,6 +258,7 @@ exports[`BridgeController trackUnifiedSwapBridgeEvent client-side calls should t
"has_gas_included_quote": false,
"initial_load_time_all_quotes": 0,
"is_hardware_wallet": false,
"location": "Main View",
"price_impact": 6,
"quotes_count": 0,
"quotes_list": [],
Expand All @@ -278,6 +283,7 @@ exports[`BridgeController trackUnifiedSwapBridgeEvent client-side calls should t
"action_type": "swapbridge-v1",
"chain_id": "1",
"chain_name": "Ethereum",
"location": "Main View",
"token_contract": "0x123",
"token_name": "ETH",
"token_symbol": "ETH",
Expand Down Expand Up @@ -312,6 +318,7 @@ exports[`BridgeController trackUnifiedSwapBridgeEvent client-side calls should t
"action_type": "swapbridge-v1",
"chain_id_destination": "eip155:10",
"chain_id_source": "eip155:1",
"location": "Main View",
"security_warnings": [
"warning1",
],
Expand All @@ -333,6 +340,7 @@ exports[`BridgeController trackUnifiedSwapBridgeEvent client-side calls should t
"action_type": "swapbridge-v1",
"chain_id_destination": null,
"chain_id_source": "eip155:1",
"location": "Main View",
"token_address_destination": null,
"token_address_source": "eip155:1/slip44:60",
},
Expand All @@ -357,6 +365,7 @@ exports[`BridgeController trackUnifiedSwapBridgeEvent client-side calls should t
"initial_load_time_all_quotes": 0,
"is_best_quote": true,
"is_hardware_wallet": false,
"location": "Main View",
"price_impact": 0,
"provider": "provider_bridge",
"quoted_time_minutes": 10,
Expand Down Expand Up @@ -398,6 +407,7 @@ exports[`BridgeController trackUnifiedSwapBridgeEvent client-side calls should t
"has_gas_included_quote": false,
"initial_load_time_all_quotes": 0,
"is_hardware_wallet": false,
"location": "Main View",
"price_impact": 0,
"provider": "provider_bridge",
"quoted_time_minutes": 10,
Expand Down Expand Up @@ -427,6 +437,7 @@ exports[`BridgeController updateBridgeQuoteRequestParams should only poll once i
"action_type": "swapbridge-v1",
"input": "chain_source",
"input_value": "eip155:1",
"location": "Main View",
},
],
[
Expand All @@ -435,6 +446,7 @@ exports[`BridgeController updateBridgeQuoteRequestParams should only poll once i
"action_type": "swapbridge-v1",
"input": "chain_destination",
"input_value": "eip155:10",
"location": "Main View",
},
],
[
Expand All @@ -443,6 +455,7 @@ exports[`BridgeController updateBridgeQuoteRequestParams should only poll once i
"action_type": "swapbridge-v1",
"input": "token_destination",
"input_value": "eip155:10/erc20:0x123",
"location": "Main View",
},
],
[
Expand All @@ -451,6 +464,7 @@ exports[`BridgeController updateBridgeQuoteRequestParams should only poll once i
"action_type": "swapbridge-v1",
"input": "slippage",
"input_value": 0.5,
"location": "Main View",
},
],
[
Expand All @@ -462,6 +476,7 @@ exports[`BridgeController updateBridgeQuoteRequestParams should only poll once i
"custom_slippage": true,
"has_sufficient_funds": true,
"is_hardware_wallet": false,
"location": "Main View",
"security_warnings": [],
"slippage_limit": 0.5,
"stx_enabled": true,
Expand All @@ -488,6 +503,7 @@ exports[`BridgeController updateBridgeQuoteRequestParams should only poll once i
"has_gas_included_quote": false,
"initial_load_time_all_quotes": 11000,
"is_hardware_wallet": false,
"location": "Main View",
"price_impact": 0,
"provider": "provider_bridge",
"quoted_time_minutes": 10,
Expand Down Expand Up @@ -834,6 +850,7 @@ exports[`BridgeController updateBridgeQuoteRequestParams should trigger quote po
"action_type": "swapbridge-v1",
"input": "chain_source",
"input_value": "eip155:1",
"location": "Main View",
},
],
[
Expand All @@ -842,6 +859,7 @@ exports[`BridgeController updateBridgeQuoteRequestParams should trigger quote po
"action_type": "swapbridge-v1",
"input": "chain_destination",
"input_value": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
"location": "Main View",
},
],
[
Expand All @@ -850,6 +868,7 @@ exports[`BridgeController updateBridgeQuoteRequestParams should trigger quote po
"action_type": "swapbridge-v1",
"input": "token_destination",
"input_value": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/token:123d1",
"location": "Main View",
},
],
[
Expand All @@ -858,6 +877,7 @@ exports[`BridgeController updateBridgeQuoteRequestParams should trigger quote po
"action_type": "swapbridge-v1",
"input": "slippage",
"input_value": 0.5,
"location": "Main View",
},
],
[
Expand All @@ -869,6 +889,7 @@ exports[`BridgeController updateBridgeQuoteRequestParams should trigger quote po
"custom_slippage": true,
"has_sufficient_funds": true,
"is_hardware_wallet": false,
"location": "Main View",
"security_warnings": [],
"slippage_limit": 0.5,
"stx_enabled": true,
Expand All @@ -890,6 +911,7 @@ exports[`BridgeController updateBridgeQuoteRequestParams should trigger quote po
"custom_slippage": true,
"has_sufficient_funds": true,
"is_hardware_wallet": false,
"location": "Main View",
"security_warnings": [],
"slippage_limit": 0.5,
"stx_enabled": true,
Expand All @@ -911,6 +933,7 @@ exports[`BridgeController updateBridgeQuoteRequestParams should trigger quote po
"custom_slippage": true,
"has_sufficient_funds": true,
"is_hardware_wallet": false,
"location": "Main View",
"security_warnings": [],
"slippage_limit": 0.5,
"stx_enabled": true,
Expand All @@ -933,6 +956,7 @@ exports[`BridgeController updateBridgeQuoteRequestParams should trigger quote po
"error_message": "Network error",
"has_sufficient_funds": true,
"is_hardware_wallet": false,
"location": "Main View",
"security_warnings": [],
"slippage_limit": 0.5,
"stx_enabled": true,
Expand All @@ -954,6 +978,7 @@ exports[`BridgeController updateBridgeQuoteRequestParams should trigger quote po
"custom_slippage": true,
"has_sufficient_funds": true,
"is_hardware_wallet": false,
"location": "Main View",
"security_warnings": [],
"slippage_limit": 0.5,
"stx_enabled": true,
Expand All @@ -976,6 +1001,7 @@ exports[`BridgeController updateBridgeQuoteRequestParams should update the quote
"action_type": "swapbridge-v1",
"input": "chain_source",
"input_value": "eip155:1",
"location": "Main View",
},
],
[
Expand All @@ -984,6 +1010,7 @@ exports[`BridgeController updateBridgeQuoteRequestParams should update the quote
"action_type": "swapbridge-v1",
"input": "chain_destination",
"input_value": "eip155:10",
"location": "Main View",
},
],
[
Expand All @@ -992,6 +1019,7 @@ exports[`BridgeController updateBridgeQuoteRequestParams should update the quote
"action_type": "swapbridge-v1",
"input": "slippage",
"input_value": 0.5,
"location": "Main View",
},
],
]
Expand Down Expand Up @@ -1110,6 +1138,7 @@ exports[`BridgeController updateBridgeQuoteRequestParams: should handle malforme
"socket|quote.destAsset.address",
"lifi|quote.srcAsset.decimals",
],
"location": "Main View",
"refresh_count": 0,
"token_address_destination": "eip155:1/slip44:60",
"token_address_source": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/token:NATIVE",
Expand Down
Loading
Loading