1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-04 23:14:56 +01:00
metamask-extension/ui/pages/settings/experimental-tab/experimental-tab.container.js
Filip Sekulic 43f7a44c25
Adding popular custom network integration (#14557)
* Initial push

* Refactored the code

* Additional code

* Removed the unused message

* Added a tooltip

* Fixed tests

* Lint fix

* Added style to a tooltip

* Fix e2e test failure

* Lint fix and code revert

* Fix e2e test

* Fixed paddings

* Fixed paddings

* CSS fix

* Minified svg files

* Applied requested changes

* Fixed theme issue

* Code revert

* Added back overridden code

* Icon problem fixed

* Lint fix

* Replaced H3 with H4

* Added unit test

* Added breadcrumbs

* Added const props for networks

* Lint fix

* Lint fix

* Added toggle button for showing the custom network list and resolved few issues

* Fixed routes

* Refactored a piece of code

* Enabled searching for the newly created option

* Fixed unit test

* Updated theme
2022-06-30 13:49:07 -02:30

55 lines
1.6 KiB
JavaScript

import { compose } from 'redux';
import { connect } from 'react-redux';
import { withRouter } from 'react-router-dom';
import {
setUseTokenDetection,
setUseCollectibleDetection,
setOpenSeaEnabled,
setEIP1559V2Enabled,
setTheme,
setCustomNetworkListEnabled,
} from '../../../store/actions';
import {
getUseTokenDetection,
getUseCollectibleDetection,
getOpenSeaEnabled,
getEIP1559V2Enabled,
getTheme,
getIsCustomNetworkListEnabled,
} from '../../../selectors';
import ExperimentalTab from './experimental-tab.component';
const mapStateToProps = (state) => {
return {
useTokenDetection: getUseTokenDetection(
state,
) /** TODO: Remove during TOKEN_DETECTION_V2 feature flag clean up */,
useCollectibleDetection: getUseCollectibleDetection(state),
openSeaEnabled: getOpenSeaEnabled(state),
eip1559V2Enabled: getEIP1559V2Enabled(state),
theme: getTheme(state),
customNetworkListEnabled: getIsCustomNetworkListEnabled(state),
};
};
const mapDispatchToProps = (dispatch) => {
return {
setUseTokenDetection: (val) =>
dispatch(
setUseTokenDetection(val),
) /** TODO: Remove during TOKEN_DETECTION_V2 feature flag clean up */,
setUseCollectibleDetection: (val) =>
dispatch(setUseCollectibleDetection(val)),
setOpenSeaEnabled: (val) => dispatch(setOpenSeaEnabled(val)),
setEIP1559V2Enabled: (val) => dispatch(setEIP1559V2Enabled(val)),
setTheme: (val) => dispatch(setTheme(val)),
setCustomNetworkListEnabled: (val) =>
dispatch(setCustomNetworkListEnabled(val)),
};
};
export default compose(
withRouter,
connect(mapStateToProps, mapDispatchToProps),
)(ExperimentalTab);