1
0
Commit Graph

16868 Commits

Author SHA1 Message Date
ThomasV
7ca89f56ee partial-writes using jsonpatch
- partial writes are append only.

 - StoredDict objects will append partial writes to the wallet
   file when items are added, replaced, removed.

 - Lists in the wallet file that have not been registered
   as StoredObject are converted to StoredList, which
   overloads append() and remove(). Those methods too will
   append partial writes to the wallet file.

 - Unlike the old jsonpatch branch, this branch does not support
   file encryption. Encrypted files always fully rewritten, even
   if the change before encryption is a partial write.
2023-09-24 12:24:09 +02:00
ThomasV
019be008d6 json_db: do not overload load_data.
instead, pass an upgrader function to the constructor.
2023-09-24 12:10:35 +02:00
SomberNight
4978d40956 qt gui __init__: restore import order - raise pyqt5 missing early
follow-up https://github.com/spesmilo/electrum/pull/8560
2023-09-24 02:31:25 +00:00
ThomasV
4cc3c704b2 QML: Check passwords with WalletDB instances that have no storage,
to avoid unwanted side effects.

In qedaemon, call load_wallet with upgrade=True when loading a
wallet. Apparently, this was not done before; db upgrades were
performed as a side-effect of password verification...
2023-09-23 15:15:48 +02:00
ThomasV
30038f4ace follow-up previous commit: write storage only if there was an upgrade 2023-09-23 15:15:17 +02:00
ThomasV
517cef8248 jsondb: write storage in __init__, in case there was a db upgrade 2023-09-23 14:05:18 +02:00
ThomasV
56e80c20d7 wallet_db upgrade: do not use '/' in StoredDict keys 2023-09-23 11:05:36 +02:00
SomberNight
a7128438d4 wallet_db: fix typo in renamed arg "upgrade"
follow-up 8be3c4dadd
2023-09-22 16:36:47 +00:00
SomberNight
0a3dd8e5e5 keepkey: fix TIM_RECOVER restore method
follow-up 8be3c4dadd
related: https://github.com/spesmilo/electrum/pull/8560#discussion_r1329127300
2023-09-22 16:23:10 +00:00
ThomasV
44dddee4d2 qt wizard: restore previous window size 2023-09-22 17:51:41 +02:00
ThomasV
83ff192bf5 follow-up 190c19d48c 2023-09-22 17:50:46 +02:00
Sander van Grieken
190c19d48c whitespace, imports, code style 2023-09-22 16:38:37 +02:00
ThomasV
4acf1ac1df new wizard: set default values for proxy and autoconnect 2023-09-22 16:34:28 +02:00
ThomasV
e581781775 Merge pull request #8592 from spesmilo/jsondb_cleanup
Jsondb cleanup
2023-09-22 15:22:32 +02:00
Sander van Grieken
6e52aa0edd qml: fix wizard multisig cosigner script and derivation GUI component name 2023-09-22 15:16:30 +02:00
ThomasV
68159b3ef6 walletDB: replace 'manual_upgrades' parameter with 'upgrade', with opposite semantics 2023-09-22 15:02:07 +02:00
ThomasV
b5bc5ff9ed Separate WalletDB from storage upgrades.
Make sure that WalletDB.data is always a StoredDict.
Perform db upgrades in a separate class, since they
operate on a dict object.
2023-09-22 15:02:06 +02:00
Sander van Grieken
af2b0f758d qml: remove split wallet functionality.
old multi-account wallets were never used on mobile, so we don't need to support this.
2023-09-22 14:57:03 +02:00
Sander van Grieken
78fbc27ec0 qt: remove potentially confusing reference to 'install wizard' in trezor, keepkey, safe_t hww settings dialogs 2023-09-22 12:13:21 +02:00
ThomasV
8be3c4dadd Merge pull request #8560 from accumulator/qtwizard
new wizard Qt desktop client
2023-09-22 10:13:01 +02:00
Sander van Grieken
44a1595157 wizard: don't use hww encryption of wallet files for anything besides standard wallets,
check hw wallet file decrypt in WCHWUnlock,
fix assumption 'wallet_type' exists in wallet open scenario.
2023-09-21 14:20:01 +02:00
ThomasV
6c4e603ff6 regtest: pass config options from regtest.py to script 2023-09-21 12:47:11 +02:00
ThomasV
622162a056 submarine swaps:
- use SPV'd funding_height.conf instead of txin.height
- remove local transactions if funding tx was double spent
2023-09-21 10:29:15 +02:00
SomberNight
baa443295d wallet: add sanity check for storage encryption version
multisig wallet cannot have StorageEncryptionVersion.XPUB_PASSWORD
2023-09-20 17:28:18 +00:00
ThomasV
f8c2a38954 get_full_history: replace item if it has unique child
(follow-up 7eabbbc81f)

This may happen if we delete a local transaction.
2023-09-20 16:48:59 +02:00
Sander van Grieken
2caa8f13cf wizard: make wizard.keystore_from_data more robust;
- always store 'keystore_type' in cosigner data and use same types as main
- dont share 'hardware_device' in root of dict, but store for each cosigner
- properly return hardware keystore for hardware cosigners
2023-09-20 14:34:31 +02:00
Sander van Grieken
81089a1ef9 wizard: keepkey scope pin lineedit to instance 2023-09-20 14:34:31 +02:00
Sander van Grieken
22d3a5edbb wizard: fix trezor initialisation/recover not setting page valid to True
add auto-proceed to next page after init to trezor, safe_t, keepkey
2023-09-20 14:34:31 +02:00
Sander van Grieken
808f1877d2 wizard: allow slip39 for multisig
also, consistent single quoting of strings
2023-09-20 14:34:31 +02:00
Sander van Grieken
5080c224d0 qt: fix device list after rescan 2023-09-20 14:34:31 +02:00
Sander van Grieken
ec0dbc78c2 wizard: fix assumption 'keystore_type' is present in wizard_data, fix unexpected keystore type msg 2023-09-20 14:34:31 +02:00
SomberNight
1a91da67ea coldcard: factor out manipulate_keystore_dict_during_wizard_setup 2023-09-20 14:34:31 +02:00
SomberNight
d2c7df3180 wizard: fix hww scan debug_msg not working correctly 2023-09-20 14:34:31 +02:00
Sander van Grieken
a1dea837a7 plugins: make HW_PluginBase an abstract baseclass 2023-09-20 14:34:31 +02:00
Sander van Grieken
551a0e988c wizard: remove base_wizard.py 2023-09-20 14:34:31 +02:00
Sander van Grieken
f69316d1a6 trustedcoin: remove old wizard code 2023-09-20 14:34:31 +02:00
Sander van Grieken
4101946ff5 wizard: add non-hardened derivation path check for digital bitbox, re-add rescan button in choose hw device,
clear clipboard before confirming seed.
2023-09-20 14:34:31 +02:00
Sander van Grieken
7313259815 wizard: keepkey and safe_t set valid on init, handle xprv validation, report error when exception 2023-09-20 14:34:31 +02:00
Sander van Grieken
60d1d1e599 wizard: add missing keepkey porting, fix password focus for default and picked wallets,
add abstract method decl HW_PluginBase.wizard_entry_for_device
2023-09-20 14:34:31 +02:00
Sander van Grieken
7fd3b6c91d wizard: remove finished call, it's unused
qt: call is_finalized before closing the wizard dialog and add a check if wallet can be
    decrypted with the supplied secret (user pw, hw device)
2023-09-20 14:34:31 +02:00
Sander van Grieken
dd64b5c628 wizard: add bitbox02 new wallet init and checks to new wizard 2023-09-20 14:34:31 +02:00
Sander van Grieken
50d2cdb1b5 wizard: improve hww uninitialized default msg. attempt fix flake issue w.r.t ABC 2023-09-20 14:34:31 +02:00
Sander van Grieken
b7612605c5 wizard: add Digital Bitbox initialization to new wizard, remove rescan button
Note: the option to load a backup from SD card when the device already has a seed
has been removed. The device always returns an error when attempting this.
2023-09-20 14:34:31 +02:00
Sander van Grieken
03435ebdbe hw_wallet: inherit from ABC and use @abstractmethod decorators instead of raise NotImplementedError 2023-09-20 14:34:31 +02:00
Sander van Grieken
f3d843a855 qt: hww scan, focus rescan button only if no devices found 2023-09-20 14:34:31 +02:00
Sander van Grieken
d4d57c3aef qt: automatically proceed wizard when unlocking existing wallet or succesful retrieve of xpub
for new wallet
2023-09-20 14:34:31 +02:00
Sander van Grieken
f7b34003cc plugin: device_model_name defaults to plugin name if not overridden. 2023-09-20 14:34:31 +02:00
Sander van Grieken
087718f3a7 hww: mark device_model_name(self) as @abstractmethod and override in hww clients that did not define it. 2023-09-20 14:34:31 +02:00
Sander van Grieken
d68e6a69c1 qt: wizardcomponents all use Logger mixin. Fix missing self.plugins init in WCTrezorInitMethod 2023-09-20 14:34:31 +02:00
Sander van Grieken
2a81ab6569 qml: show user feedback when wallet file has action pending 2023-09-20 14:34:31 +02:00