diff --git a/ui/app/components/app/asset-list/asset-list.js b/ui/app/components/app/asset-list/asset-list.js index 172704337..ad9017390 100644 --- a/ui/app/components/app/asset-list/asset-list.js +++ b/ui/app/components/app/asset-list/asset-list.js @@ -18,7 +18,20 @@ const AssetList = () => { const selectedAccountBalance = useSelector((state) => getCurrentAccountWithSendEtherInfo(state).balance) const selectedTokenAddress = useSelector((state) => state.metamask.selectedTokenAddress) const showFiat = useSelector(getShouldShowFiat) - const metricsEvent = useMetricEvent() + const selectTokenEvent = useMetricEvent({ + eventOpts: { + category: 'Navigation', + action: 'Token Menu', + name: 'Clicked Token', + }, + }) + const addTokenEvent = useMetricEvent({ + eventOpts: { + category: 'Navigation', + action: 'Token Menu', + name: 'Clicked "Add Token"', + }, + }) const { currency: primaryCurrency, @@ -56,25 +69,13 @@ const AssetList = () => { { dispatch(setSelectedToken(tokenAddress)) - metricsEvent({ - eventOpts: { - category: 'Navigation', - action: 'Token Menu', - name: 'Clicked Token', - }, - }) + selectTokenEvent() }} /> { history.push(ADD_TOKEN_ROUTE) - metricsEvent({ - eventOpts: { - category: 'Navigation', - action: 'Token Menu', - name: 'Clicked "Add Token"', - }, - }) + addTokenEvent() }} />