diff --git a/views/Settings/Privacy.tsx b/views/Settings/Privacy.tsx
index e105260a7..4e1b0159a 100644
--- a/views/Settings/Privacy.tsx
+++ b/views/Settings/Privacy.tsx
@@ -9,7 +9,6 @@ import { localeString } from './../../utils/LocaleUtils';
import { themeColor } from './../../utils/ThemeUtils';
import DropdownSetting from './../../components/DropdownSetting';
-import LoadingIndicator from './../../components/LoadingIndicator';
import Switch from './../../components/Switch';
import TextInput from './../../components/TextInput';
@@ -56,10 +55,13 @@ export default class Privacy extends React.Component<
customBlockExplorer:
(settings.privacy && settings.privacy.customBlockExplorer) ||
'',
- clipboard: settings.privacy && settings.privacy.clipboard,
- lurkerMode: settings.privacy && settings.privacy.lurkerMode,
+ clipboard:
+ (settings.privacy && settings.privacy.clipboard) || false,
+ lurkerMode:
+ (settings.privacy && settings.privacy.lurkerMode) || false,
enableMempoolRates:
- settings.privacy && settings.privacy.enableMempoolRates
+ (settings.privacy && settings.privacy.enableMempoolRates) ||
+ false
});
}
@@ -81,7 +83,7 @@ export default class Privacy extends React.Component<
lurkerMode,
enableMempoolRates
} = this.state;
- const { updateSettings, loading }: any = SettingsStore;
+ const { updateSettings }: any = SettingsStore;
const BackButton = () => (
- {loading ? (
-
- ) : (
-
- {
- this.setState({
- defaultBlockExplorer: value
- });
- await updateSettings({
- privacy: {
- defaultBlockExplorer: value,
- customBlockExplorer,
- clipboard,
- lurkerMode,
- enableMempoolRates
- }
- });
- }}
- values={BLOCK_EXPLORER_KEYS}
- />
-
- {defaultBlockExplorer === 'Custom' && (
- <>
-
- {localeString(
- 'views.Settings.Privacy.customBlockExplorer'
- )}
-
- {
- this.setState({
- customBlockExplorer: text
- });
-
- await updateSettings({
- privacy: {
- defaultBlockExplorer,
- customBlockExplorer: text,
- clipboard,
- lurkerMode,
- enableMempoolRates
- }
- });
- }}
- />
- >
+
+ {
+ this.setState({
+ defaultBlockExplorer: value
+ });
+ await updateSettings({
+ privacy: {
+ defaultBlockExplorer: value,
+ customBlockExplorer,
+ clipboard,
+ lurkerMode,
+ enableMempoolRates
+ }
+ });
+ }}
+ values={BLOCK_EXPLORER_KEYS}
+ />
-
-
+
{localeString(
- 'views.Settings.Privacy.clipboard'
+ 'views.Settings.Privacy.customBlockExplorer'
)}
-
-
+ {
+ this.setState({
+ customBlockExplorer: text
+ });
+
+ await updateSettings({
+ privacy: {
+ defaultBlockExplorer,
+ customBlockExplorer: text,
+ clipboard,
+ lurkerMode,
+ enableMempoolRates
+ }
+ });
}}
- >
- {
- this.setState({
- clipboard: !clipboard
- });
- await updateSettings({
- privacy: {
- defaultBlockExplorer,
- customBlockExplorer,
- clipboard: !clipboard,
- lurkerMode,
- enableMempoolRates
- }
- });
- }}
- />
-
-
-
+ >
+ )}
+
+
+
-
- {localeString(
- 'views.Settings.Privacy.lurkerMode'
- )}
-
-
- {
- this.setState({
- lurkerMode: !lurkerMode
- });
- await updateSettings({
- privacy: {
- defaultBlockExplorer,
- customBlockExplorer,
- clipboard,
- lurkerMode: !lurkerMode,
- enableMempoolRates
- }
- });
- }}
- />
-
-
-
+
- {
+ this.setState({
+ clipboard: !clipboard
+ });
+ await updateSettings({
+ privacy: {
+ defaultBlockExplorer,
+ customBlockExplorer,
+ clipboard: !clipboard,
+ lurkerMode,
+ enableMempoolRates
+ }
+ });
}}
- >
- {localeString(
- 'views.Settings.Privacy.enableMempoolRates'
- )}
-
-
+
+
+
+
+ {localeString('views.Settings.Privacy.lurkerMode')}
+
+
+ {
+ this.setState({
+ lurkerMode: !lurkerMode
+ });
+ await updateSettings({
+ privacy: {
+ defaultBlockExplorer,
+ customBlockExplorer,
+ clipboard,
+ lurkerMode: !lurkerMode,
+ enableMempoolRates
+ }
+ });
}}
- >
- {
- this.setState({
+ />
+
+
+
+
+ {localeString(
+ 'views.Settings.Privacy.enableMempoolRates'
+ )}
+
+
+ {
+ this.setState({
+ enableMempoolRates: !enableMempoolRates
+ });
+ await updateSettings({
+ privacy: {
+ defaultBlockExplorer,
+ customBlockExplorer,
+ clipboard,
+ lurkerMode,
enableMempoolRates:
!enableMempoolRates
- });
- await updateSettings({
- privacy: {
- defaultBlockExplorer,
- customBlockExplorer,
- clipboard,
- lurkerMode,
- enableMempoolRates:
- !enableMempoolRates
- }
- });
- }}
- />
-
-
-
- )}
+ }
+ });
+ }}
+ />
+
+
+
);
}