diff options
author | Dan Miller <danjm.com@gmail.com> | 2018-08-16 15:43:13 +0800 |
---|---|---|
committer | Dan Miller <danjm.com@gmail.com> | 2018-08-27 22:14:16 +0800 |
commit | 65873e33e407b5af2c4134ddcbc48f4e81bdfa4f (patch) | |
tree | d6d1a09cb548baa35d65535a5d083510ed664003 /ui/app/components/pages | |
parent | 30e49b8545a33faf2f1d1451c9135c996a6816b0 (diff) | |
download | tangerine-wallet-browser-65873e33e407b5af2c4134ddcbc48f4e81bdfa4f.tar tangerine-wallet-browser-65873e33e407b5af2c4134ddcbc48f4e81bdfa4f.tar.gz tangerine-wallet-browser-65873e33e407b5af2c4134ddcbc48f4e81bdfa4f.tar.bz2 tangerine-wallet-browser-65873e33e407b5af2c4134ddcbc48f4e81bdfa4f.tar.lz tangerine-wallet-browser-65873e33e407b5af2c4134ddcbc48f4e81bdfa4f.tar.xz tangerine-wallet-browser-65873e33e407b5af2c4134ddcbc48f4e81bdfa4f.tar.zst tangerine-wallet-browser-65873e33e407b5af2c4134ddcbc48f4e81bdfa4f.zip |
Adds feature flag toggle for the hex data row on the send screen.
Diffstat (limited to 'ui/app/components/pages')
-rw-r--r-- | ui/app/components/pages/settings/settings.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ui/app/components/pages/settings/settings.js b/ui/app/components/pages/settings/settings.js index ff42a13de..a5ea1b89c 100644 --- a/ui/app/components/pages/settings/settings.js +++ b/ui/app/components/pages/settings/settings.js @@ -66,6 +66,30 @@ class Settings extends Component { ]) } + renderHexDataOptIn () { + const { metamask: { featureFlags: { sendHexData } }, setHexDataFeatureFlag } = this.props + + return h('div.settings__content-row', [ + h('div.settings__content-item', [ + h('span', this.context.t('showHexData')), + h( + 'div.settings__content-description', + this.context.t('showHexDataDescription') + ), + ]), + h('div.settings__content-item', [ + h('div.settings__content-item-col', [ + h(ToggleButton, { + value: sendHexData, + onToggle: (value) => setHexDataFeatureFlag(!value), + activeLabel: '', + inactiveLabel: '', + }), + ]), + ]), + ]) + } + renderCurrentConversion () { const { metamask: { currentCurrency, conversionDate }, setCurrentCurrency } = this.props @@ -307,6 +331,7 @@ class Settings extends Component { !isMascara && this.renderOldUI(), this.renderResetAccount(), this.renderBlockieOptIn(), + this.renderHexDataOptIn(), ]) ) } @@ -315,6 +340,7 @@ class Settings extends Component { Settings.propTypes = { metamask: PropTypes.object, setUseBlockie: PropTypes.func, + setHexDataFeatureFlag: PropTypes.func, setCurrentCurrency: PropTypes.func, setRpcTarget: PropTypes.func, displayWarning: PropTypes.func, @@ -349,6 +375,9 @@ const mapDispatchToProps = dispatch => { setFeatureFlagToBeta: () => { return dispatch(actions.setFeatureFlag('betaUI', false, 'OLD_UI_NOTIFICATION_MODAL')) }, + setHexDataFeatureFlag: (featureFlagShowState) => { + return dispatch(actions.setFeatureFlag('sendHexData', featureFlagShowState)) + }, showResetAccountConfirmationModal: () => { return dispatch(actions.showModal({ name: 'CONFIRM_RESET_ACCOUNT' })) }, |