1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

add locale to page events (#9802)

This commit is contained in:
Brad Decker 2020-11-06 11:17:59 -06:00 committed by GitHub
parent bff982017b
commit 9095ae3f47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -168,6 +168,7 @@ export function MetaMetricsProvider({ children }) {
// We do not want to send addresses or accounts in any events // We do not want to send addresses or accounts in any events
// Some routes include these as params. // Some routes include these as params.
params: omit(params, ['account', 'address']), params: omit(params, ['account', 'address']),
locale: locale.replace('_', '-'),
network, network,
environment_type: environmentType, environment_type: environmentType,
}, },
@ -176,7 +177,14 @@ export function MetaMetricsProvider({ children }) {
} }
previousMatch.current = match?.path previousMatch.current = match?.path
} }
}, [location, context, network, metaMetricsId, participateInMetaMetrics]) }, [
location,
locale,
context,
network,
metaMetricsId,
participateInMetaMetrics,
])
return ( return (
<MetaMetricsContext.Provider value={trackEvent}> <MetaMetricsContext.Provider value={trackEvent}>