You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
887 B
30 lines
887 B
4 years ago
|
import { connect } from 'react-redux';
|
||
|
import { setParticipateInMetaMetrics } from '../../../store/actions';
|
||
|
import { getFirstTimeFlowTypeRoute } from '../../../selectors';
|
||
|
import MetaMetricsOptIn from './metametrics-opt-in.component';
|
||
6 years ago
|
|
||
|
const firstTimeFlowTypeNameMap = {
|
||
|
create: 'Selected Create New Wallet',
|
||
4 years ago
|
import: 'Selected Import Wallet',
|
||
4 years ago
|
};
|
||
6 years ago
|
|
||
|
const mapStateToProps = (state) => {
|
||
4 years ago
|
const { firstTimeFlowType, participateInMetaMetrics } = state.metamask;
|
||
6 years ago
|
|
||
|
return {
|
||
|
nextRoute: getFirstTimeFlowTypeRoute(state),
|
||
4 years ago
|
firstTimeSelectionMetaMetricsName:
|
||
|
firstTimeFlowTypeNameMap[firstTimeFlowType],
|
||
6 years ago
|
participateInMetaMetrics,
|
||
4 years ago
|
};
|
||
|
};
|
||
6 years ago
|
|
||
5 years ago
|
const mapDispatchToProps = (dispatch) => {
|
||
6 years ago
|
return {
|
||
4 years ago
|
setParticipateInMetaMetrics: (val) =>
|
||
|
dispatch(setParticipateInMetaMetrics(val)),
|
||
4 years ago
|
};
|
||
|
};
|
||
6 years ago
|
|
||
4 years ago
|
export default connect(mapStateToProps, mapDispatchToProps)(MetaMetricsOptIn);
|