diff --git a/electrum/gui/qml/components/wizard/WCWelcome.qml b/electrum/gui/qml/components/wizard/WCWelcome.qml index 56754b774..7d440e58c 100644 --- a/electrum/gui/qml/components/wizard/WCWelcome.qml +++ b/electrum/gui/qml/components/wizard/WCWelcome.qml @@ -12,9 +12,11 @@ WizardComponent { function apply() { wizard_data['use_defaults'] = use_defaults.checked + wizard_data['want_proxy'] = false if (use_defaults.checked) { wizard_data['autoconnect'] = true - wizard_data['want_proxy'] = false + } else { + wizard_data['autoconnect'] = undefined } } diff --git a/electrum/gui/qt/wizard/server_connect.py b/electrum/gui/qt/wizard/server_connect.py index 4b0d3a739..5ff56d764 100644 --- a/electrum/gui/qt/wizard/server_connect.py +++ b/electrum/gui/qt/wizard/server_connect.py @@ -66,9 +66,11 @@ class WCWelcome(WizardComponent): def apply(self): self.wizard_data['use_defaults'] = self.use_defaults_w.isChecked() + self.wizard_data['want_proxy'] = False if self.use_defaults_w.isChecked(): self.wizard_data['autoconnect'] = True - self.wizard_data['want_proxy'] = False + else: + self.wizard_data['autoconnect'] = None class WCAutoConnect(WizardComponent): diff --git a/electrum/wizard.py b/electrum/wizard.py index c32c9d855..3b714a1a5 100644 --- a/electrum/wizard.py +++ b/electrum/wizard.py @@ -656,6 +656,7 @@ class ServerConnectWizard(AbstractWizard): self.navmap = { 'welcome': { 'next': 'proxy_ask', + 'accept': self.do_configure_autoconnect, 'last': lambda d: d['use_defaults'] }, 'proxy_ask': { @@ -704,7 +705,8 @@ class ServerConnectWizard(AbstractWizard): def do_configure_autoconnect(self, wizard_data: dict): self._logger.debug(f'configuring autoconnect: {wizard_data!r}') if self._daemon.config.cv.NETWORK_AUTO_CONNECT.is_modifiable(): - self._daemon.config.NETWORK_AUTO_CONNECT = wizard_data['autoconnect'] + if autoconnect := wizard_data.get('autoconnect') is not None: + self._daemon.config.NETWORK_AUTO_CONNECT = autoconnect def start(self, initial_data: dict = None) -> WizardViewState: if initial_data is None: