tqt first-time network setup: fix edge case - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 446f21c2062b2734bbddb994a43fce2b4ba77050 DIR parent dfb3138d87511a89ab75346a0502fd8ccba1fc29 HTML Author: SomberNight <somber.night@protonmail.com> Date: Thu, 21 May 2020 19:27:46 +0200 qt first-time network setup: fix edge case previously, consider following flow: - user selects "Select server manually" - "next" - network dialog is shown, user leaves everything at default - "next" - we would not save the "auto_connect" key, and hence the first-time network setup will be shown during the next app start again Diffstat: M electrum/gui/qt/installwizard.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- DIR diff --git a/electrum/gui/qt/installwizard.py b/electrum/gui/qt/installwizard.py t@@ -20,6 +20,7 @@ from electrum.wallet import Wallet, Abstract_Wallet from electrum.storage import WalletStorage, StorageReadWriteError from electrum.util import UserCancelled, InvalidPassword, WalletFileException, get_new_wallet_name from electrum.base_wizard import BaseWizard, HWD_SETUP_DECRYPT_WALLET, GoBack, ReRunDialog +from electrum.network import Network from electrum.i18n import _ from .seed_dialog import SeedLayout, KeysLayout t@@ -674,7 +675,7 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard): self.exec_layout(vbox, _('Master Public Key')) return None - def init_network(self, network): + def init_network(self, network: 'Network'): message = _("Electrum communicates with remote servers to get " "information about your transactions and addresses. The " "servers all fulfill the same purpose only differing in " t@@ -691,6 +692,7 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard): nlayout = NetworkChoiceLayout(network, self.config, wizard=True) if self.exec_layout(nlayout.layout()): nlayout.accept() + self.config.set_key('auto_connect', network.auto_connect, True) else: network.auto_connect = True self.config.set_key('auto_connect', True, True)