mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-02 22:24:27 +01:00
101fe0b27a
* Don't send errors to sentry if users have not opted-in to participate in metametrics * Don't capture opt-out metrics * Move the metrics-opt in screen to immediately after the welcome screen * Ensure that global.getSentryState is set in the background * Fix e2e tests after rearranging onboardin flow * Fix unit tests * More e2e test fixes * Remove unnecessary wrappers around capture exception
28 lines
774 B
JavaScript
28 lines
774 B
JavaScript
import { connect } from 'react-redux';
|
|
import { setParticipateInMetaMetrics } from '../../../store/actions';
|
|
import MetaMetricsOptIn from './metametrics-opt-in.component';
|
|
|
|
const firstTimeFlowTypeNameMap = {
|
|
create: 'Selected Create New Wallet',
|
|
import: 'Selected Import Wallet',
|
|
};
|
|
|
|
const mapStateToProps = (state) => {
|
|
const { firstTimeFlowType, participateInMetaMetrics } = state.metamask;
|
|
|
|
return {
|
|
firstTimeSelectionMetaMetricsName:
|
|
firstTimeFlowTypeNameMap[firstTimeFlowType],
|
|
participateInMetaMetrics,
|
|
};
|
|
};
|
|
|
|
const mapDispatchToProps = (dispatch) => {
|
|
return {
|
|
setParticipateInMetaMetrics: (val) =>
|
|
dispatch(setParticipateInMetaMetrics(val)),
|
|
};
|
|
};
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(MetaMetricsOptIn);
|