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