import { compose } from 'redux'; import { connect } from 'react-redux'; import { withRouter } from 'react-router-dom'; import { setFeatureFlag, setParticipateInMetaMetrics, setUsePhishDetect, setUseMultiAccountBalanceChecker, } from '../../../store/actions'; import SecurityTab from './security-tab.component'; const mapStateToProps = (state) => { const { appState: { warning }, metamask, } = state; const { featureFlags: { showIncomingTransactions } = {}, participateInMetaMetrics, usePhishDetect, useMultiAccountBalanceChecker, } = metamask; return { warning, showIncomingTransactions, participateInMetaMetrics, usePhishDetect, useMultiAccountBalanceChecker, }; }; const mapDispatchToProps = (dispatch) => { return { setParticipateInMetaMetrics: (val) => dispatch(setParticipateInMetaMetrics(val)), setShowIncomingTransactionsFeatureFlag: (shouldShow) => dispatch(setFeatureFlag('showIncomingTransactions', shouldShow)), setUsePhishDetect: (val) => dispatch(setUsePhishDetect(val)), setUseMultiAccountBalanceChecker: (val) => dispatch(setUseMultiAccountBalanceChecker(val)), }; }; export default compose( withRouter, connect(mapStateToProps, mapDispatchToProps), )(SecurityTab);