From 52dd9d269cca3dc6ecf7a3d85b2bc9acecc6bb4e Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Thu, 17 Oct 2019 15:15:32 -0400 Subject: [PATCH] disable sync for encrypted wallets with no saved password --- src/ui/component/syncToggle/view.jsx | 3 +++ src/ui/page/settings/view.jsx | 11 ++++++++++- static/app-strings.json | 3 ++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/ui/component/syncToggle/view.jsx b/src/ui/component/syncToggle/view.jsx index 401c5b60d..be40e79cd 100644 --- a/src/ui/component/syncToggle/view.jsx +++ b/src/ui/component/syncToggle/view.jsx @@ -12,6 +12,7 @@ type Props = { history: { push: string => void }, location: UrlLocation, getSyncError: ?string, + disabled: boolean, }; function SyncToggle(props: Props) { @@ -22,6 +23,7 @@ function SyncToggle(props: Props) { getSyncError, history, location: { pathname }, + disabled = false, } = props; function handleChange() { @@ -47,6 +49,7 @@ function SyncToggle(props: Props) { label={__('Sync your balance and preferences accross devices.')} checked={syncEnabled} onChange={handleChange} + disabled={disabled} /> )} diff --git a/src/ui/page/settings/view.jsx b/src/ui/page/settings/view.jsx index 8b6d45310..39aa423c7 100644 --- a/src/ui/page/settings/view.jsx +++ b/src/ui/page/settings/view.jsx @@ -196,6 +196,7 @@ class SettingsPage extends React.PureComponent { darkModeTimes, clearCache, } = this.props; + const { storedPassword } = this.state; const noDaemonSettings = !daemonSettings || Object.keys(daemonSettings).length === 0; @@ -215,7 +216,15 @@ class SettingsPage extends React.PureComponent { ) : (
} /> - } /> + } + /> {/* @if TARGET='app' */}