diff --git a/packages/checkout/widgets-lib/src/widgets/add-funds/views/AddFunds.tsx b/packages/checkout/widgets-lib/src/widgets/add-funds/views/AddFunds.tsx index 479e4f1d52..d8fc7b8332 100644 --- a/packages/checkout/widgets-lib/src/widgets/add-funds/views/AddFunds.tsx +++ b/packages/checkout/widgets-lib/src/widgets/add-funds/views/AddFunds.tsx @@ -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: {