From e99e9e8e6204f2a68ec95e89a788f2e77a362497 Mon Sep 17 00:00:00 2001 From: Overtorment Date: Fri, 19 Jul 2019 21:19:53 +0100 Subject: [PATCH] FIX: electrum settings --- screen/settings/electrumSettings.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/screen/settings/electrumSettings.js b/screen/settings/electrumSettings.js index ad68a155c..912d5c4bd 100644 --- a/screen/settings/electrumSettings.js +++ b/screen/settings/electrumSettings.js @@ -42,7 +42,11 @@ export default class ElectrumSettings extends Component { this.state.host = this.state.host ? this.state.host : ''; this.state.port = this.state.port ? this.state.port : ''; try { - if (!(await BlueElectrum.testConnection(this.state.host, this.state.port))) { + if (!this.state.host && !this.state.port) { + await AsyncStorage.setItem(AppStorage.ELECTRUM_HOST, ''); + await AsyncStorage.setItem(AppStorage.ELECTRUM_TCP_PORT, ''); + alert('Your changes have been saved successfully. Restart may be required for changes to take effect.'); + } else if (!(await BlueElectrum.testConnection(this.state.host, this.state.port))) { alert("Can't connect to provided Electrum server"); } else { await AsyncStorage.setItem(AppStorage.ELECTRUM_HOST, this.state.host);