From c76c9ca2c86317f902f443db2c5704d4bf6311c0 Mon Sep 17 00:00:00 2001 From: bitpshr Date: Thu, 27 Sep 2018 14:19:09 -0400 Subject: EIP-1102: updated implementation --- .../settings-tab/settings-tab.component.js | 32 ++++++++++++++++++++++ .../settings-tab/settings-tab.container.js | 1 + 2 files changed, 33 insertions(+) (limited to 'ui/app/components/pages/settings') 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 cd81491a8..21119086e 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 @@ -45,6 +45,7 @@ export default class SettingsTab extends PureComponent { displayWarning: PropTypes.func, revealSeedConfirmation: PropTypes.func, setFeatureFlagToBeta: PropTypes.func, + showClearApprovalModal: PropTypes.func, showResetAccountConfirmationModal: PropTypes.func, warning: PropTypes.string, history: PropTypes.object, @@ -276,6 +277,36 @@ export default class SettingsTab extends PureComponent { ) } + renderClearApproval () { + const { t } = this.context + const { showClearApprovalModal } = this.props + return ( +
+
+ { t('approvalData') } + + { t('approvalDataDescription') } + +
+
+
+ +
+
+
+ ) + } + renderSeedWords () { const { t } = this.context const { history } = this.props @@ -473,6 +504,7 @@ export default class SettingsTab extends PureComponent { { this.renderNewRpcUrl() } { this.renderStateLogs() } { this.renderSeedWords() } + { this.renderClearApproval() } { !isMascara && this.renderOldUI() } { this.renderResetAccount() } { this.renderBlockieOptIn() } 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 f4110207e..2c0739a91 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 @@ -59,6 +59,7 @@ const mapDispatchToProps = dispatch => { setUseNativeCurrencyAsPrimaryCurrencyPreference: value => { return dispatch(setUseNativeCurrencyAsPrimaryCurrencyPreference(value)) }, + showClearApprovalModal: () => dispatch(showModal({ name: 'CLEAR_APPROVED_ORIGINS' })), } } -- cgit