Skip to content

Commit

Permalink
chore: deprecate BridgeLinkClicked event
Browse files Browse the repository at this point in the history
  • Loading branch information
micaelae committed Feb 6, 2025
1 parent 15cb2f6 commit a505087
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
17 changes: 2 additions & 15 deletions ui/hooks/bridge/useBridging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const useBridging = () => {

const openBridgeExperience = useCallback(
(
location: string,
location: MetaMetricsSwapsEventSource | 'Carousel',
token: SwapsTokenObject | SwapsEthToken,
portfolioUrlSuffix?: string,
isSwap = false,
Expand All @@ -71,25 +71,12 @@ const useBridging = () => {
event: MetaMetricsEventName.ActionOpened,
category: MetaMetricsEventCategory.Navigation,
properties: {
location:
location === 'Home'
? MetaMetricsSwapsEventSource.MainView
: MetaMetricsSwapsEventSource.TokenView,
location,
chain_id_source: providerConfig.chainId,
token_symbol_source: token.symbol,
token_address_source: token.address,
},
});
trackEvent({
event: MetaMetricsEventName.BridgeLinkClicked,
category: MetaMetricsEventCategory.Navigation,
properties: {
token_symbol: token.symbol,
location,
text: 'Bridge',
chain_id: providerConfig.chainId,
},
});
let url = `${CROSS_CHAIN_SWAP_ROUTE}${PREPARE_SWAP_ROUTE}`;
url += `?token=${token.address}`;
if (isSwap) {
Expand Down
2 changes: 1 addition & 1 deletion ui/hooks/bridge/useCrossChainSwapsEventTracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {

export type CrossChainSwapsEventProperties = {
[MetaMetricsEventName.ActionOpened]: RequestParams & {
location: MetaMetricsSwapsEventSource;
location: MetaMetricsSwapsEventSource | 'Carousel';
};
[MetaMetricsEventName.ActionCompleted]: RequestParams &
RequestMetadata &
Expand Down

0 comments on commit a505087

Please sign in to comment.