diff options
Diffstat (limited to 'ui/app/components/pages/settings')
-rw-r--r-- | ui/app/components/pages/settings/settings-tab/settings-tab.component.js | 29 | ||||
-rw-r--r-- | ui/app/components/pages/settings/settings-tab/settings-tab.container.js | 3 |
2 files changed, 32 insertions, 0 deletions
diff --git a/ui/app/components/pages/settings/settings-tab/settings-tab.component.js b/ui/app/components/pages/settings/settings-tab/settings-tab.component.js index ce1f72407..1c02b2507 100644 --- a/ui/app/components/pages/settings/settings-tab/settings-tab.component.js +++ b/ui/app/components/pages/settings/settings-tab/settings-tab.component.js @@ -59,6 +59,8 @@ export default class SettingsTab extends PureComponent { nativeCurrency: PropTypes.string, useNativeCurrencyAsPrimaryCurrency: PropTypes.bool, setUseNativeCurrencyAsPrimaryCurrencyPreference: PropTypes.func, + setAdvancedInlineGasFeatureFlag: PropTypes.func, + advancedInlineGas: PropTypes.bool, } state = { @@ -412,6 +414,32 @@ export default class SettingsTab extends PureComponent { ) } + renderAdvancedGasInputInline () { + const { t } = this.context + const { advancedInlineGas, setAdvancedInlineGasFeatureFlag } = this.props + + return ( + <div className="settings-page__content-row"> + <div className="settings-page__content-item"> + <span>{ t('showAdvancedGasInline') }</span> + <div className="settings-page__content-description"> + { t('showAdvancedGasInlineDescription') } + </div> + </div> + <div className="settings-page__content-item"> + <div className="settings-page__content-item-col"> + <ToggleButton + value={advancedInlineGas} + onToggle={value => setAdvancedInlineGasFeatureFlag(!value)} + activeLabel="" + inactiveLabel="" + /> + </div> + </div> + </div> + ) + } + renderUsePrimaryCurrencyOptions () { const { t } = this.context const { @@ -508,6 +536,7 @@ export default class SettingsTab extends PureComponent { { this.renderClearApproval() } { this.renderPrivacyOptIn() } { this.renderHexDataOptIn() } + { this.renderAdvancedGasInputInline() } { this.renderBlockieOptIn() } </div> ) 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 92f645438..49da0db12 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 @@ -25,6 +25,7 @@ const mapStateToProps = state => { featureFlags: { sendHexData, privacyMode, + advancedInlineGas, } = {}, provider = {}, currentLocale, @@ -39,6 +40,7 @@ const mapStateToProps = state => { nativeCurrency, useBlockie, sendHexData, + advancedInlineGas, privacyMode, provider, useNativeCurrencyAsPrimaryCurrency, @@ -54,6 +56,7 @@ const mapDispatchToProps = dispatch => { setUseBlockie: value => dispatch(setUseBlockie(value)), updateCurrentLocale: key => dispatch(updateCurrentLocale(key)), setHexDataFeatureFlag: shouldShow => dispatch(setFeatureFlag('sendHexData', shouldShow)), + setAdvancedInlineGasFeatureFlag: shouldShow => dispatch(setFeatureFlag('advancedInlineGas', shouldShow)), setPrivacyMode: enabled => dispatch(setFeatureFlag('privacyMode', enabled)), showResetAccountConfirmationModal: () => dispatch(showModal({ name: 'CONFIRM_RESET_ACCOUNT' })), setUseNativeCurrencyAsPrimaryCurrencyPreference: value => { |