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-15 19:49:42 +01:00
|
|
|
setUseNftDetection,
|
2021-12-01 05:12:27 +01:00
|
|
|
setOpenSeaEnabled,
|
2022-11-17 15:13:02 +01:00
|
|
|
setTransactionSecurityCheckEnabled,
|
2021-11-26 19:54:57 +01:00
|
|
|
} from '../../../store/actions';
|
|
|
|
import {
|
2022-11-15 19:49:42 +01:00
|
|
|
getUseNftDetection,
|
2021-12-01 05:12:27 +01:00
|
|
|
getOpenSeaEnabled,
|
2022-11-17 15:13:02 +01:00
|
|
|
getIsTransactionSecurityCheckEnabled,
|
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-15 19:49:42 +01:00
|
|
|
useNftDetection: getUseNftDetection(state),
|
2021-12-01 05:12:27 +01:00
|
|
|
openSeaEnabled: getOpenSeaEnabled(state),
|
2022-11-17 15:13:02 +01:00
|
|
|
transactionSecurityCheckEnabled:
|
|
|
|
getIsTransactionSecurityCheckEnabled(state),
|
2021-09-20 18:22:04 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
const mapDispatchToProps = (dispatch) => {
|
|
|
|
return {
|
2022-11-15 19:49:42 +01:00
|
|
|
setUseNftDetection: (val) => dispatch(setUseNftDetection(val)),
|
2021-12-01 05:12:27 +01:00
|
|
|
setOpenSeaEnabled: (val) => dispatch(setOpenSeaEnabled(val)),
|
2022-11-17 15:13:02 +01:00
|
|
|
setTransactionSecurityCheckEnabled: (val) =>
|
|
|
|
dispatch(setTransactionSecurityCheckEnabled(val)),
|
2021-09-20 18:22:04 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export default compose(
|
|
|
|
withRouter,
|
|
|
|
connect(mapStateToProps, mapDispatchToProps),
|
|
|
|
)(ExperimentalTab);
|