2019-02-27 15:46:41 +01:00
|
|
|
import { connect } from 'react-redux'
|
2020-05-04 17:22:34 +02:00
|
|
|
import { getOnboardingInitiator } from '../../../selectors'
|
2020-11-10 22:27:08 +01:00
|
|
|
import { setCompletedOnboarding } from '../../../store/actions'
|
2020-08-18 21:18:25 +02:00
|
|
|
import EndOfFlow from './end-of-flow.component'
|
2019-02-27 15:46:41 +01:00
|
|
|
|
2019-03-05 16:45:01 +01:00
|
|
|
const firstTimeFlowTypeNameMap = {
|
|
|
|
create: 'New Wallet Created',
|
2020-11-03 00:41:28 +01:00
|
|
|
import: 'New Wallet Imported',
|
2019-03-05 16:45:01 +01:00
|
|
|
}
|
|
|
|
|
2019-11-22 18:03:51 +01:00
|
|
|
const mapStateToProps = (state) => {
|
2020-11-03 00:41:28 +01:00
|
|
|
const {
|
|
|
|
metamask: { firstTimeFlowType },
|
|
|
|
} = state
|
2019-03-05 16:45:01 +01:00
|
|
|
|
|
|
|
return {
|
|
|
|
completionMetaMetricsName: firstTimeFlowTypeNameMap[firstTimeFlowType],
|
2019-11-22 18:03:51 +01:00
|
|
|
onboardingInitiator: getOnboardingInitiator(state),
|
2019-03-05 16:45:01 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-10 22:27:08 +01:00
|
|
|
const mapDispatchToProps = (dispatch) => {
|
|
|
|
return {
|
|
|
|
setCompletedOnboarding: () => dispatch(setCompletedOnboarding()),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(EndOfFlow)
|