1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-18 15:33:21 +01:00
metamask-extension/ui/app/pages/settings/security-tab/security-tab.container.js

44 lines
1.0 KiB
JavaScript
Raw Normal View History

2020-02-24 23:58:26 +01:00
import { compose } from 'redux'
import { connect } from 'react-redux'
import { withRouter } from 'react-router-dom'
import {
setFeatureFlag,
setParticipateInMetaMetrics,
setUsePhishDetect,
} from '../../../store/actions'
import SecurityTab from './security-tab.component'
2020-02-15 21:34:12 +01:00
const mapStateToProps = (state) => {
const {
2020-11-03 00:41:28 +01:00
appState: { warning },
metamask,
} = state
const {
featureFlags: { showIncomingTransactions } = {},
participateInMetaMetrics,
usePhishDetect,
} = metamask
return {
warning,
showIncomingTransactions,
participateInMetaMetrics,
usePhishDetect,
}
}
2020-02-15 21:34:12 +01:00
const mapDispatchToProps = (dispatch) => {
return {
2020-11-03 00:41:28 +01:00
setParticipateInMetaMetrics: (val) =>
dispatch(setParticipateInMetaMetrics(val)),
setShowIncomingTransactionsFeatureFlag: (shouldShow) =>
dispatch(setFeatureFlag('showIncomingTransactions', shouldShow)),
setUsePhishDetect: (val) => dispatch(setUsePhishDetect(val)),
}
}
export default compose(
withRouter,
connect(mapStateToProps, mapDispatchToProps),
)(SecurityTab)