Commit Graph

101 Commits

Author SHA1 Message Date
SomberNight
68fb996d20 wallet_db version 52: break non-homogeneous multisig wallets
- case 1: in version 4.4.1, 4.4.2, the qml GUI wizard allowed creating multisig wallets with an old_mpk as cosigner.
- case 2: in version 4.4.0, 4.4.1, 4.4.2, the qml GUI wizard allowed creating multisig wallets with mixed xpub/Ypub/Zpub.

The corresponding missing input validation was a bug in the wizard, it was unintended behaviour. Validation was added in d2cf21fc2b. Note however that there might be users who created such wallet files.

Re case 1 wallet files: there is no version of Electrum that allows spending from such a wallet. Coins received at addresses are not burned, however it is technically challenging to spend them. (unless the multisig can spend without needing the old_mpk cosigner in the quorum).

Re case 2 wallet files: it is possible to create a corresponding spending wallet for such a multisig, however it is a bit tricky. The script type for the addresses in such a heterogeneous xpub wallet is based on the xpub_type of the first keystore. So e.g. given a wallet file [Yprv1, Zpub2] it will have sh(wsh()) scripts, and the cosigner should create a wallet file [Ypub1, Zprv2] (same order).

Technically case 2 wallet files could be "fixed" automatically by converting the xpub types as part of a wallet_db upgrade. However if the wallet files also contain seeds, those cannot be converted ("standard" vs "segwit" electrum seed).
Case 1 wallet files are not possible to "fix" automatically as the cosigner using the old_mpk is not bip32 based.

It is unclear if there are *any* users out there affected by this. I suspect for case 1 it is very likely there are none (not many people have pre-2.0 electrum seeds which were never supported as part of a multisig who would also now try to create a multisig using them); for case 2 however there might be.

This commit breaks both case 1 and case 2 wallets: these wallet files can no longer be opened in new Electrum, an error message is shown and the crash reporter opens. If any potential users opt to send crash reports, at least we will know they exist and can help them recover.
2023-05-11 14:26:11 +00:00
Sander van Grieken
cb9ba819ec qml: remove Qt Vkbd leftovers 2023-05-09 15:43:52 +02:00
Sander van Grieken
6394cdcd3b qml: disable Qt Virtual Keyboard and refactor keyboardFreeZone item to take
android system keyboard into account
2023-05-01 18:39:16 +02:00
Sander van Grieken
1b362f64f2 qml: properly delete wizard components after use. fixes #8357 2023-04-29 13:57:16 +02:00
Sander van Grieken
264540e12b qml: consistency camelcase public slots qedaemon, qeinvoice, qewizard 2023-04-25 13:40:16 +02:00
Sander van Grieken
61179ede8c qml: consistency camelcase qewallet 2023-04-25 13:33:15 +02:00
Sander van Grieken
959d481e93 qml: create ScanDialog 2023-04-24 13:19:01 +02:00
Sander van Grieken
323aa84279 qml: only allow wallet menu if on wallet specific page 2023-04-20 10:37:49 +02:00
Sander van Grieken
1649f9993e qml: limit wallet name label widths so they get wrapped/elided. fixes #8317 2023-04-20 10:27:30 +02:00
ThomasV
5e29b94561 qml MessageDialog: split messages into title and header message. hide header if it is empty. 2023-04-18 14:07:41 +02:00
ThomasV
a03f4769ca auth_protect: pass authMessage in the auth_protect decorator,
instead of relying on side-effects

This is probably safer, and also more self-contained.
2023-04-17 18:17:29 +02:00
Sander van Grieken
5b6a16e097 qml: add auth_message to AuthMixin, which is displayed above the Pin entry textfield, or
shown in a messageDialog for confirmation.
2023-04-17 16:32:20 +02:00
Sander van Grieken
62af3265cb qml: disable menu option associated with current page 2023-04-17 15:36:13 +02:00
Sander van Grieken
3cab3b86b4 qml: remove SwapProgressDialog, introduce qeswaphelper.state and enable dialog elements
depending on qeswaphelper.state

TODO: we can now retrieve the pairs from the service asynchronously, which should eliminate
the startup delay when showing the SwapDialog
2023-04-14 14:32:56 +02:00
Sander van Grieken
21d1a6239f qml: always pass wallet password to init_lightning.
emit also dataChanged so UI updates node pubkey
2023-04-14 12:21:38 +02:00
Sander van Grieken
f43cd7b278 followup prev 2023-04-12 16:21:31 +02:00
Sander van Grieken
7a8e980712 qml: since qeswaphelper is tied to SwapDialog anyway, let's make it a direct child 2023-04-12 16:19:17 +02:00
Sander van Grieken
d5ce9c0994 qml: destroy qeswaphelper with SwapDialog and catch RuntimeErrors if qeswalhelper members are accessed after 2023-04-12 16:09:37 +02:00
Sander van Grieken
27cd7fe8a8 qml: deduplicate swap initiation, move to main.qml 2023-04-12 12:32:25 +02:00
Sander van Grieken
75f63a4666 qml: remove yesClicked signal, use accept()/accepted signal in MessageDialog. 2023-04-11 10:22:48 +02:00
SomberNight
1530668960 qt/qml: delay starting network until after first-start-network-setup
The qt, qml, and kivy GUIs have a first-start network-setup screen
that allows the user customising the network settings before creating a wallet.
Previously the daemon used to create the network and start it, before this screen,
before the GUI even starts. If the user changed network settings, those would
be set on the already running network, potentially including restarting the network.

Now it becomes the responsibility of the GUI to start the network, allowing this
first-start customisation to take place before starting the network at all.
The qt and the qml GUIs are adapted to make use of this. Kivy, and the other
prototype GUIs are not adapted and just start the network right away, as before.
2023-03-30 00:59:02 +00:00
Sander van Grieken
4bdd521a4b qml: abstract ElDialog resize behavior to property 2023-03-23 10:30:40 +01:00
Sander van Grieken
17bb1ad5c5 qml: enable Qt virtual keyboard and add Electrum keyboard style, modified from Qt 'default' style 2023-03-23 10:30:40 +01:00
Sander van Grieken
e7cc2c5a63 Revert "qml: pressing "Esc" on desktop to ~simulate "back" button"
This reverts commit 7f7ee8d82f.

This commit caused a regression with the android back button not closing a dialog.

reproduce:
1. from the main window, press receive.
2. in the request details window, press Create request.
3. in the receive payment dialog, press Copy
4. observe dialog cannot be closed by back button
2023-03-23 10:12:10 +01:00
ThomasV
36687e436d Merge pull request #8273 from SomberNight/202303_qml_esc_shortcut
qml: pressing "Esc" on desktop to ~simulate "back" button
2023-03-22 08:15:01 +01:00
SomberNight
558eb1a372 qml: reorganise toolbarTopLayout, so that top-left click opens menu
previously clicking too far left would not open the wallet-menu:
- click on label would open it, but
- click on wallet-icon or padding to its left would not
2023-03-21 17:51:29 +00:00
SomberNight
7f7ee8d82f qml: pressing "Esc" on desktop to ~simulate "back" button 2023-03-21 16:51:50 +00:00
Sander van Grieken
f0d44d0681 qml: expand clickable area to full toolbar height and a bit more padding for right-side menu 2023-03-16 12:09:57 +01:00
ThomasV
337d2a32d8 qml PIN: do not lock inactive app, and remove timeout
- the activity callback does not work properly on android
  (does not work on my phone). Also, it duplicates the lock
  screen function of most phones.

- if we do not lock inactive app, then the PIN feature does
  not need a timeout, and is easier to understand without it.

- in Preferences, explain what it does
2023-03-16 09:37:43 +01:00
ThomasV
09afacd51c qml: fix logical error with PIN code timeout. 2023-03-16 08:29:36 +01:00
Sander van Grieken
f7a300b89b qml: successful PIN entry stays valid for 5 mins 2023-03-09 10:19:17 +01:00
Sander van Grieken
0da1be33b7 qml: topbar label show wallet icon only when wallet name is displayed 2023-03-02 15:44:30 +01:00
Sander van Grieken
6383f83933 qml: separate app menu and wallet menu 2023-03-02 12:54:59 +01:00
Sander van Grieken
f65158a23f qml: move menu back to topbar, move addresses and channels to walletdetails and
add walletdetails to topbar menu
2023-03-02 10:49:01 +01:00
Sander van Grieken
32d00b2982 qml: wallet loading indicator as modal dialog, unclosable 2023-02-23 20:46:56 +01:00
Sander van Grieken
278486602b qml: add loader overlay, avoid interacting with the to-be-unloaded wallet 2023-02-23 18:20:29 +01:00
Sander van Grieken
15d73daf8d qml: fix lifecycle issues with swap helper.
previously tied to Channels view, now dynamically created and parented to app
2023-02-16 13:24:23 +01:00
Sander van Grieken
421bd93047 qml: fix a few leftovers 2023-02-14 15:37:17 +01:00
Sander van Grieken
e9ad9986d7 qml: qedaemon doesn't need wallet path and name properties, pass them via the signal 2023-02-10 14:27:39 +01:00
Sander van Grieken
11439fb3fd qml: don't stack exception dialogs when multiple exceptions happen 2023-02-09 01:34:54 +01:00
Sander van Grieken
5eb7bcebef qml: remove ugly notification popup, add wallet name to notifications 2023-02-07 13:55:22 +01:00
Sander van Grieken
78d68d00e0 qml: override default Material styling for toolbar, use grays 2023-02-07 12:23:14 +01:00
Sander van Grieken
d2bab4d51a qml: confirm close electrum dialog instead of double-tap back button 2023-01-31 13:15:19 +01:00
Sander van Grieken
54ced26885 qml: remove leftover 2023-01-30 14:10:25 +01:00
Sander van Grieken
c747182122 qml: make sure ExceptionDialog is always on top 2023-01-27 13:30:53 +01:00
Sander van Grieken
9afea4768d qml: make bolt icon a gossip progress indicator 2023-01-17 17:23:50 +01:00
Sander van Grieken
38472c895c qml: NetworkOverview removed from menu, now triggered by onchain and lightning status icon 2023-01-17 16:52:50 +01:00
Sander van Grieken
ff8a049525 qml swap send and receive buttons, move menu button to bottom button group 2023-01-17 16:33:21 +01:00
Sander van Grieken
ddfe1a6d70 qml: add lightning network status indicator in top bar, add channel peers to NetworkOverview 2023-01-13 12:36:33 +01:00
Sander van Grieken
fa030b3fa5 qml: initial crash handler impl 2023-01-10 17:02:38 +01:00