Skip to content

Commit

Permalink
[NO CHANGELOGS] [Add Funds Widget] Update to only send track event wh…
Browse files Browse the repository at this point in the history
…en route exists (#2322)
  • Loading branch information
jiyounglee authored Oct 17, 2024
1 parent 2a44fa9 commit 5b321fa
Showing 1 changed file with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,20 +172,22 @@ export function AddFunds({
};

const setSelectedRouteData = (route: RouteData | undefined) => {
track({
userJourney: UserJourney.ADD_FUNDS,
screen: 'InputScreen',
control: 'RoutesMenu',
controlType: 'MenuItem',
extras: {
toTokenAddress: route?.amountData.toToken.address,
toTokenChainId: route?.amountData.toToken.chainId,
fromTokenAddress: route?.amountData.fromToken.address,
fromTokenChainId: route?.amountData.fromToken.chainId,
toAmount: route?.amountData.toAmount,
fromAmount: route?.amountData.fromAmount,
},
});
if (route) {
track({
userJourney: UserJourney.ADD_FUNDS,
screen: 'InputScreen',
control: 'RoutesMenu',
controlType: 'MenuItem',
extras: {
toTokenAddress: route.amountData.toToken.address,
toTokenChainId: route.amountData.toToken.chainId,
fromTokenAddress: route.amountData.fromToken.address,
fromTokenChainId: route.amountData.fromToken.chainId,
toAmount: route.amountData.toAmount,
fromAmount: route.amountData.fromAmount,
},
});
}

addFundsDispatch({
payload: {
Expand Down

0 comments on commit 5b321fa

Please sign in to comment.