aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pages/settings/settings-tab/settings-tab.container.js
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@users.noreply.github.com>2018-10-17 07:03:29 +0800
committerGitHub <noreply@github.com>2018-10-17 07:03:29 +0800
commitbadebe017fe28b58ac742082368484c3a4b1c1bc (patch)
treeb0810d259ea104a11051dd48dc1038a9c2d82310 /ui/app/components/pages/settings/settings-tab/settings-tab.container.js
parent8bccb88132447882f81105a0033a4f199200714f (diff)
downloadtangerine-wallet-browser-badebe017fe28b58ac742082368484c3a4b1c1bc.tar.gz
tangerine-wallet-browser-badebe017fe28b58ac742082368484c3a4b1c1bc.tar.zst
tangerine-wallet-browser-badebe017fe28b58ac742082368484c3a4b1c1bc.zip
Adds toggle for primary currency (#5421)
* Add UnitInput component * Add CurrencyInput component * Add UserPreferencedCurrencyInput component * Add UserPreferencedCurrencyDisplay component * Add updatePreferences action * Add styles for CurrencyInput, CurrencyDisplay, and UnitInput * Update SettingsTab page with Primary Currency toggle * Refactor currency displays and inputs to use UserPreferenced displays and inputs * Add TokenInput component * Add UserPreferencedTokenInput component * Use TokenInput in the send screen * Fix unit tests * Fix e2e and integration tests * Remove send/CurrencyDisplay component * Replace diamond unicode character with Eth logo. Fix typos
Diffstat (limited to 'ui/app/components/pages/settings/settings-tab/settings-tab.container.js')
-rw-r--r--ui/app/components/pages/settings/settings-tab/settings-tab.container.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/app/components/pages/settings/settings-tab/settings-tab.container.js b/ui/app/components/pages/settings/settings-tab/settings-tab.container.js
index 665b56f5c..de30f309c 100644
--- a/ui/app/components/pages/settings/settings-tab/settings-tab.container.js
+++ b/ui/app/components/pages/settings/settings-tab/settings-tab.container.js
@@ -11,7 +11,9 @@ import {
updateCurrentLocale,
setFeatureFlag,
showModal,
+ setUseETHAsPrimaryCurrencyPreference,
} from '../../../../actions'
+import { preferencesSelector } from '../../../../selectors'
const mapStateToProps = state => {
const { appState: { warning }, metamask } = state
@@ -24,6 +26,7 @@ const mapStateToProps = state => {
isMascara,
currentLocale,
} = metamask
+ const { useETHAsPrimaryCurrency } = preferencesSelector(state)
return {
warning,
@@ -34,6 +37,7 @@ const mapStateToProps = state => {
useBlockie,
sendHexData,
provider,
+ useETHAsPrimaryCurrency,
}
}
@@ -50,6 +54,9 @@ const mapDispatchToProps = dispatch => {
},
setHexDataFeatureFlag: shouldShow => dispatch(setFeatureFlag('sendHexData', shouldShow)),
showResetAccountConfirmationModal: () => dispatch(showModal({ name: 'CONFIRM_RESET_ACCOUNT' })),
+ setUseETHAsPrimaryCurrencyPreference: value => {
+ return dispatch(setUseETHAsPrimaryCurrencyPreference(value))
+ },
}
}