From f7ea2e0d3c6619e68641e471ccc6614509f56bf0 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Fri, 5 Jan 2024 15:34:20 +0000 Subject: [PATCH] trustedcoin: fix qt wizard two-part-wallet-creation, online phase ``` 25.30 | E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter Traceback (most recent call last): File "/home/user/wspace/electrum/electrum/gui/qt/__init__.py", line 439, in _start_wizard_to_select_or_create_wallet wallet = self.daemon.load_wallet(wallet_file, d['password'], upgrade=True) File "/home/user/wspace/electrum/electrum/daemon.py", line 481, in func_wrapper return func(self, *args, **kwargs) File "/home/user/wspace/electrum/electrum/daemon.py", line 491, in load_wallet wallet = self._load_wallet(path, password, upgrade=upgrade, config=self.config) File "/home/user/wspace/electrum/electrum/util.py", line 481, in do_profile o = func(*args, **kw_args) File "/home/user/wspace/electrum/electrum/daemon.py", line 516, in _load_wallet raise WalletUnfinished(db) electrum.wallet_db.WalletUnfinished: During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/user/wspace/electrum/electrum/gui/qt/wizard/wizard.py", line 203, in on_next_button_clicked if self.is_finalized(wd): File "/home/user/wspace/electrum/electrum/gui/qt/wizard/wallet.py", line 178, in is_finalized if not wizard_data['wallet_exists'] or wizard_data['wallet_is_open']: KeyError: 'wallet_exists' ``` --- electrum/gui/qt/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/electrum/gui/qt/__init__.py b/electrum/gui/qt/__init__.py index bbcbeddcd..58c6bee08 100644 --- a/electrum/gui/qt/__init__.py +++ b/electrum/gui/qt/__init__.py @@ -451,12 +451,13 @@ class ElectrumGui(BaseElectrumGui, Logger): xprv = k1.get_master_private_key(d['password']) else: xprv = db.get('x1')['xprv'] - data = { + _wiz_data_updates = { 'wallet_name': os.path.basename(wallet_file), 'xprv1': xprv, 'xpub1': db.get('x1')['xpub'], 'xpub2': db.get('x2')['xpub'], } + data = {**d, **_wiz_data_updates} wizard = QENewWalletWizard(self.config, self.app, self.plugins, self.daemon, path, start_viewstate=WizardViewState('trustedcoin_tos', data, {})) result = wizard.exec()