Browse Source

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: <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'
```
master
SomberNight 2 years ago
parent
commit
f7ea2e0d3c
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 3
      electrum/gui/qt/__init__.py

3
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()

Loading…
Cancel
Save