1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-04 23:14:56 +01:00
metamask-extension/ui/app/pages/settings/security-tab/security-tab.container.js
Erik Marks 76a2a9bb8b
@metamask/eslint config@5.0.0 (#10358)
* @metamask/eslint-config@5.0.0
* Update eslintrc and prettierrc
* yarn lint:fix
2021-02-04 10:15:23 -08:00

44 lines
1.1 KiB
JavaScript

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';
const mapStateToProps = (state) => {
const {
appState: { warning },
metamask,
} = state;
const {
featureFlags: { showIncomingTransactions } = {},
participateInMetaMetrics,
usePhishDetect,
} = metamask;
return {
warning,
showIncomingTransactions,
participateInMetaMetrics,
usePhishDetect,
};
};
const mapDispatchToProps = (dispatch) => {
return {
setParticipateInMetaMetrics: (val) =>
dispatch(setParticipateInMetaMetrics(val)),
setShowIncomingTransactionsFeatureFlag: (shouldShow) =>
dispatch(setFeatureFlag('showIncomingTransactions', shouldShow)),
setUsePhishDetect: (val) => dispatch(setUsePhishDetect(val)),
};
};
export default compose(
withRouter,
connect(mapStateToProps, mapDispatchToProps),
)(SecurityTab);