1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-24 19:10:22 +01:00
metamask-extension/ui/app/pages/settings/security-tab/security-tab.container.js

41 lines
1.0 KiB
JavaScript
Raw Normal View History

import SecurityTab from './security-tab.component'
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'
2020-02-15 21:34:12 +01:00
const mapStateToProps = (state) => {
const { 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 {
setParticipateInMetaMetrics: (val) => dispatch(setParticipateInMetaMetrics(val)),
2020-02-15 21:34:12 +01:00
setShowIncomingTransactionsFeatureFlag: (shouldShow) => dispatch(setFeatureFlag('showIncomingTransactions', shouldShow)),
setUsePhishDetect: (val) => dispatch(setUsePhishDetect(val)),
}
}
export default compose(
withRouter,
connect(mapStateToProps, mapDispatchToProps)
)(SecurityTab)