|
|
@ -83,6 +83,12 @@ export function MetaMetricsProvider({ children }) { |
|
|
|
const context = useSegmentContext() |
|
|
|
const context = useSegmentContext() |
|
|
|
const network = useSelector(getMetricsNetworkIdentifier) |
|
|
|
const network = useSelector(getMetricsNetworkIdentifier) |
|
|
|
const chainId = useSelector(getCurrentChainId) |
|
|
|
const chainId = useSelector(getCurrentChainId) |
|
|
|
|
|
|
|
// Temporary until the background controller refactor merges:
|
|
|
|
|
|
|
|
const baseVersion = global.platform.getVersion() |
|
|
|
|
|
|
|
const version = |
|
|
|
|
|
|
|
process.env.METAMASK_ENVIRONMENT === 'production' |
|
|
|
|
|
|
|
? baseVersion |
|
|
|
|
|
|
|
: `${baseVersion}-${process.env.METAMASK_ENVIRONMENT}` |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* track a metametrics event |
|
|
|
* track a metametrics event |
|
|
@ -171,13 +177,17 @@ export function MetaMetricsProvider({ children }) { |
|
|
|
network, |
|
|
|
network, |
|
|
|
environment_type: environmentType, |
|
|
|
environment_type: environmentType, |
|
|
|
}, |
|
|
|
}, |
|
|
|
context, |
|
|
|
context: { |
|
|
|
|
|
|
|
...context, |
|
|
|
|
|
|
|
version, |
|
|
|
|
|
|
|
}, |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
previousMatch.current = match?.path |
|
|
|
previousMatch.current = match?.path |
|
|
|
} |
|
|
|
} |
|
|
|
}, [ |
|
|
|
}, [ |
|
|
|
location, |
|
|
|
location, |
|
|
|
|
|
|
|
version, |
|
|
|
locale, |
|
|
|
locale, |
|
|
|
context, |
|
|
|
context, |
|
|
|
network, |
|
|
|
network, |
|
|
|