mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-24 11:01:41 +01:00
961ad267df
* New setting tab * Add InfoTab * Add Advanced tab * Add Security Tab * Finish mobile view * Make new setting page responsive * Fix linter * Fix y scrolling * Update link in network dropdown * Fix e2e tests * Remove duplicate translation key * Resolve merge conflict * Only change settings header in popup view. * Place mobile-sync button in advanced-tab of settings
54 lines
1.5 KiB
JavaScript
54 lines
1.5 KiB
JavaScript
import SettingsTab from './settings-tab.component'
|
|
import { compose } from 'recompose'
|
|
import { connect } from 'react-redux'
|
|
import { withRouter } from 'react-router-dom'
|
|
import {
|
|
setCurrentCurrency,
|
|
displayWarning,
|
|
setUseBlockie,
|
|
updateCurrentLocale,
|
|
setUseNativeCurrencyAsPrimaryCurrencyPreference,
|
|
setParticipateInMetaMetrics,
|
|
} from '../../../store/actions'
|
|
import { preferencesSelector } from '../../../selectors/selectors'
|
|
|
|
const mapStateToProps = state => {
|
|
const { appState: { warning }, metamask } = state
|
|
const {
|
|
currentCurrency,
|
|
conversionDate,
|
|
nativeCurrency,
|
|
useBlockie,
|
|
currentLocale,
|
|
} = metamask
|
|
const { useNativeCurrencyAsPrimaryCurrency } = preferencesSelector(state)
|
|
|
|
return {
|
|
warning,
|
|
currentLocale,
|
|
currentCurrency,
|
|
conversionDate,
|
|
nativeCurrency,
|
|
useBlockie,
|
|
useNativeCurrencyAsPrimaryCurrency,
|
|
}
|
|
}
|
|
|
|
const mapDispatchToProps = dispatch => {
|
|
return {
|
|
setCurrentCurrency: currency => dispatch(setCurrentCurrency(currency)),
|
|
displayWarning: warning => dispatch(displayWarning(warning)),
|
|
setUseBlockie: value => dispatch(setUseBlockie(value)),
|
|
updateCurrentLocale: key => dispatch(updateCurrentLocale(key)),
|
|
setUseNativeCurrencyAsPrimaryCurrencyPreference: value => {
|
|
return dispatch(setUseNativeCurrencyAsPrimaryCurrencyPreference(value))
|
|
},
|
|
setParticipateInMetaMetrics: (val) => dispatch(setParticipateInMetaMetrics(val)),
|
|
}
|
|
}
|
|
|
|
export default compose(
|
|
withRouter,
|
|
connect(mapStateToProps, mapDispatchToProps)
|
|
)(SettingsTab)
|