Skip to content

Commit

Permalink
trustedcoin: fix qt wizard two-part-wallet-creation, online phase
Browse files Browse the repository at this point in the history
```
 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: <electrum.wallet_db.WalletDB object at 0x7f11db3a7ca0>

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'
```
  • Loading branch information
SomberNight committed Jan 5, 2024
1 parent 66b8ec1 commit f7ea2e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion electrum/gui/qt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,12 +451,13 @@ def _start_wizard_to_select_or_create_wallet(self, path) -> Optional[Abstract_Wa
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()
Expand Down

0 comments on commit f7ea2e0

Please sign in to comment.