2021-09-20 18:22:04 +02:00
|
|
|
import { compose } from 'redux';
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { withRouter } from 'react-router-dom';
|
2021-11-26 19:54:57 +01:00
|
|
|
import {
|
2022-11-17 15:13:02 +01:00
|
|
|
setTransactionSecurityCheckEnabled,
|
2023-07-20 17:47:01 +02:00
|
|
|
///: BEGIN:ONLY_INCLUDE_IN(blockaid)
|
|
|
|
setSecurityAlertsEnabled,
|
|
|
|
///: END:ONLY_INCLUDE_IN
|
2021-11-26 19:54:57 +01:00
|
|
|
} from '../../../store/actions';
|
|
|
|
import {
|
2022-11-17 15:13:02 +01:00
|
|
|
getIsTransactionSecurityCheckEnabled,
|
2023-07-20 17:47:01 +02:00
|
|
|
///: BEGIN:ONLY_INCLUDE_IN(blockaid)
|
|
|
|
getIsSecurityAlertsEnabled,
|
|
|
|
///: END:ONLY_INCLUDE_IN
|
2021-11-26 19:54:57 +01:00
|
|
|
} from '../../../selectors';
|
2021-09-20 18:22:04 +02:00
|
|
|
import ExperimentalTab from './experimental-tab.component';
|
|
|
|
|
|
|
|
const mapStateToProps = (state) => {
|
|
|
|
return {
|
2022-11-17 15:13:02 +01:00
|
|
|
transactionSecurityCheckEnabled:
|
|
|
|
getIsTransactionSecurityCheckEnabled(state),
|
2023-07-20 17:47:01 +02:00
|
|
|
///: BEGIN:ONLY_INCLUDE_IN(blockaid)
|
|
|
|
securityAlertsEnabled: getIsSecurityAlertsEnabled(state),
|
|
|
|
///: END:ONLY_INCLUDE_IN
|
2021-09-20 18:22:04 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
const mapDispatchToProps = (dispatch) => {
|
|
|
|
return {
|
2022-11-17 15:13:02 +01:00
|
|
|
setTransactionSecurityCheckEnabled: (val) =>
|
|
|
|
dispatch(setTransactionSecurityCheckEnabled(val)),
|
2023-07-20 17:47:01 +02:00
|
|
|
///: BEGIN:ONLY_INCLUDE_IN(blockaid)
|
|
|
|
setSecurityAlertsEnabled: (val) => setSecurityAlertsEnabled(val),
|
|
|
|
///: END:ONLY_INCLUDE_IN
|
2021-09-20 18:22:04 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export default compose(
|
|
|
|
withRouter,
|
|
|
|
connect(mapStateToProps, mapDispatchToProps),
|
|
|
|
)(ExperimentalTab);
|