mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-29 23:58:06 +01:00
45 lines
1.3 KiB
JavaScript
45 lines
1.3 KiB
JavaScript
import { compose } from 'redux';
|
|
import { connect } from 'react-redux';
|
|
import { withRouter } from 'react-router-dom';
|
|
import {
|
|
setUseTokenDetection,
|
|
setUseCollectibleDetection,
|
|
setOpenSeaEnabled,
|
|
setEIP1559V2Enabled,
|
|
setTheme,
|
|
} from '../../../store/actions';
|
|
import {
|
|
getUseTokenDetection,
|
|
getUseCollectibleDetection,
|
|
getOpenSeaEnabled,
|
|
getEIP1559V2Enabled,
|
|
getTheme,
|
|
} from '../../../selectors';
|
|
import ExperimentalTab from './experimental-tab.component';
|
|
|
|
const mapStateToProps = (state) => {
|
|
return {
|
|
useTokenDetection: getUseTokenDetection(state),
|
|
useCollectibleDetection: getUseCollectibleDetection(state),
|
|
openSeaEnabled: getOpenSeaEnabled(state),
|
|
eip1559V2Enabled: getEIP1559V2Enabled(state),
|
|
theme: getTheme(state),
|
|
};
|
|
};
|
|
|
|
const mapDispatchToProps = (dispatch) => {
|
|
return {
|
|
setUseTokenDetection: (val) => dispatch(setUseTokenDetection(val)),
|
|
setUseCollectibleDetection: (val) =>
|
|
dispatch(setUseCollectibleDetection(val)),
|
|
setOpenSeaEnabled: (val) => dispatch(setOpenSeaEnabled(val)),
|
|
setEIP1559V2Enabled: (val) => dispatch(setEIP1559V2Enabled(val)),
|
|
setTheme: (val) => dispatch(setTheme(val)),
|
|
};
|
|
};
|
|
|
|
export default compose(
|
|
withRouter,
|
|
connect(mapStateToProps, mapDispatchToProps),
|
|
)(ExperimentalTab);
|