diff --git a/bitcoin_usb/tool_gui.py b/bitcoin_usb/tool_gui.py index f5dce3c..a17f0cf 100644 --- a/bitcoin_usb/tool_gui.py +++ b/bitcoin_usb/tool_gui.py @@ -1,5 +1,4 @@ import platform -from functools import partial import bdkpython as bdk from bitcoin_safe_lib.async_tools.loop_in_thread import LoopInThread @@ -153,15 +152,16 @@ def __init__(self, network: bdk.Network, loop_in_thread: LoopInThread): # Initialize the network selection - self.combo_network.currentIndexChanged.connect( - partial(self.usb.set_network, bdk.Network[self.combo_network.currentText()]) - ) + self.combo_network.currentIndexChanged.connect(self.set_network) self.shortcut_close = QShortcut(QKeySequence("Ctrl+W"), self) self.shortcut_close.activated.connect(self.close) self.shortcut_close2 = QShortcut(QKeySequence("ESC"), self) self.shortcut_close2.activated.connect(self.close) + def set_network(self): + self.usb.set_network(self.combo_network.currentData()) + def install_udev(self): self.usb.linux_cmd_install_udev_as_sudo() diff --git a/bitcoin_usb/usb_gui.py b/bitcoin_usb/usb_gui.py index 95a96c5..c3ac22f 100644 --- a/bitcoin_usb/usb_gui.py +++ b/bitcoin_usb/usb_gui.py @@ -370,6 +370,9 @@ def handle_exception_write_down_seed(self, exception: Exception) -> bool: return True def show_error_message(self, text: str) -> None: + if "temporary wallet associated with different connection" in text: + text += "\n" + self.tr("Please try disconnecting and reconnecting the device") + if platform.system() == "Linux": self.show_error_message_linux(text) else: