user on bitcointalk [0] tried to create wallet with name "w/o 2FA".
Before this, one would only get an error after the last page of the wizard.
With this, the "Next" button does not even get enabled if the name does not look ok.
(and as in comment, maybe we should be even stricter re what is allowed)
[0]: https://bitcointalk.org/index.php?topic=5483514.msg63584789#msg63584789
- rename globals
- also rm hardcoded strings from qml
- use consistent unit names in qml
(previously mixed sat/vB and sat/byte (latter coming from core lib))
To reproduce, open two wizards in parallel. Use one to enter the flow and start creating a wallet,
then physically unplug the hw device at the correct time, and use the other wizard to trigger a rescan.
The rescan will unpair the hw device, resulting in device_manager.client_by_id to return None when
continuing the flow on the first wizard.
fixes https://github.com/spesmilo/electrum/issues/8858
fixes https://github.com/spesmilo/electrum/issues/8853
This is a bit ugly, but activeFocus is declared as final and cannot be overridden directly...
```
1.42 | W | gui.qml.qeapp | file:///home/user/wspace/electrum/electrum/gui/qml/components/controls/ElTextArea.qml:23:5: Cannot override FINAL property
```
"18 pixels" is too large when using qdarkstyle on "low" DPI screens, on Windows
(if there is also a high DPI screen connected as another monitor... eh)
- without this, in send tab paytoedit, try_payment_identifier will get called and it will error
df1b9a223c/electrum/gui/qt/paytoedit.py (L153)
- also, in all text fields this used to result in clearing the current text (but now it is kept instead)
```
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'
```
With wallet_type=="standard", if the user enters a 2fa electrum seed, the "next" btn is disabled.
This is a regression in the new wizard, the old one used to "redirect" seamlessly.
This commit does not fix this, but at least shows a user-friendly warning message.
Note: would be nice if the wizard redirected automatically, in both directions (2fa->std, std->2fa).
The old wizard implemented std->2fa (probably the more common case hit by users), and had this
warning message shown for the 2fa->std case. Now I am repurposing the warning also for std->2fa.