Commit Graph

75 Commits

Author SHA1 Message Date
Sander van Grieken
fea598cfbe network: create ProxySettings class replacing dict and encapsulating proxy related funcs,
allow enable/disable proxy without nuking proxy mode, host and port (explicit enable_proxy config setting),
move tor probe from frontend to backend code, add probe buttons for Qt and QML
2025-03-04 14:23:33 +01:00
Sander van Grieken
fd12668da4 qt: additional validation for master keys in WCHaveMasterKey in wallet wizard 2024-10-28 14:30:56 +01:00
Sander van Grieken
4a37668b01 wizard: don't require seed extension to be set early.
this also fixes deferring multisig constraint validation when seed is same as another cosigner,
but still can have different seed extension
2024-10-24 16:07:00 +02:00
ThomasV
d0693c311f new wizard: set keystore password. fixes #9147 2024-07-22 10:53:39 +02:00
SomberNight
a2d5e31838 mnemonic: rename seed_type() fn
Some functions have an argument named "seed_type" in which it was annoying to call the seed_type() fn.
(especially for functions inside the same module)
2024-06-10 20:00:52 +00:00
SomberNight
b95fbbb86f wizard: fix regression: allow passphrase for some '2fa' seeds
fixes https://github.com/spesmilo/electrum/issues/9088
2024-06-10 19:35:56 +00:00
Sander van Grieken
b11d0062e8 wizard: log state when view not defined. ref #8815 2024-03-01 10:56:32 +01:00
Sander van Grieken
d6ea2f1e30 wizard: log state when view not defined. ref #8916 2024-03-01 09:07:04 +01:00
SomberNight
b4712397cc logging: (trivial) use repr() of seed_type
for more obvious empty string

related: https://github.com/spesmilo/electrum/issues/4326#issuecomment-1903747632
2024-02-22 11:45:18 +00:00
ghost43
7da3613b12 Merge pull request #8906 from accumulator/old_2fa_passphrase
wizard: skip/hide passphrase option for 'old' and '2fa' seeds (see #4326)
2024-02-21 17:03:43 +00:00
Sander van Grieken
8ce1e6453b wizard: skip/hide passphrase option for 'old' and '2fa' seeds (see #4326) 2024-02-21 17:15:10 +01:00
SomberNight
8ab3dcce5d keystore: API changes for from_seed/from_bip43_rootseed/bip39_to_seed
- force kwargs
- add type hints
2024-02-21 15:08:19 +00:00
SomberNight
46ce5d0f3d wizard: (trivial) follow-up prev 2024-02-13 14:52:52 +00:00
SomberNight
638fdf114e wizard: don't log sensitive values: replace blacklist with whitelist
- blacklist was missing yet another item "multisig_master_pubkey"
- let's just do a whitelist. a blacklist is too risky for my liking here.
2024-02-13 13:51:53 +00:00
SomberNight
acae6751d2 wizard: do not log sensitive data (add more keys, again)
frankly this blacklist approach seems too fragile...
2024-01-31 11:23:45 +00:00
Sander van Grieken
82c21bc30d wizard: take hardware_device from correct location for cosigners. fixes #8808 2024-01-16 11:45:20 +01:00
SomberNight
683c6083c9 wizard: do not log sensitive data (add more keys) 2024-01-05 15:14:33 +00:00
Sander van Grieken
ebcecdccce qt,qml: add checkboxes for advanced network config on welcome page, remove separate proxy-ask and autoconnect pages 2023-12-21 11:17:48 +01:00
Sander van Grieken
5e39ff49bc add missing accept handler for welcome page 2023-12-19 18:49:16 +01:00
Sander van Grieken
a03b2d7bae qt,qml: add a welcome page as initial page for server connect wizard
This is much less intimidating than asking if the user wants to use a proxy
out of the gate.
2023-12-19 18:49:16 +01:00
ghost43
e814fa0b25 Merge pull request #8719 from SomberNight/202312_db_seedtype
wallet db: deduplicate "seed_type" field
2023-12-12 01:01:30 +00:00
Sander van Grieken
b87d091a6d qt, qml: allow BIP39 seeds which fail checksum or wordlist (fixes #8720)
removes verifySeed from qebitcoin as this code was 99% duplicate of wizard.validate_seed
2023-12-06 16:12:57 +01:00
SomberNight
f7cb523b9d wallet db: deduplicate "seed_type" field
In the db, the 'seed_type' field could be present both at the top-level and inside keystores.

Note:
- both fields had usages
- the top-level field was added in 2.8 re "initial segwit support" (3a64ec0f2e)
  - there was no db upgrade for it, so older files are missing it
  - if present, valid values can be electrum types but also
    other types supported by the wizard, e.g. "bip39"
- the keystore-level field was added in 4.1 (7b7bba2299)
  - there was a db upgrade when it was introduced, so old files also have it
  - if present, valid values can only be electrum types
- there is not much value in the top-level one having a non-electrum value,
  and those values were never used by other parts of the code
  - note that when creating a standard wallet from a bip39 seed, the seed is discarded.
    Only the derived xprv and the derivation path are kept. If we changed this and also kept the seed,
    e.g. to display it to the user, then it would make sense to save the seed type (e.g. "bip39").
    However storing that seed_type would make more sense at the keystore level (not top-level).

We delete the top-level 'seed_type' field.

```
{
    "keystore": {
        "seed_type": "segwit",
        ...
    },
    "seed_type": "segwit",
    ...
}
```
2023-12-01 18:43:37 +00:00
SomberNight
564b6c29b7 wizard: fix self._logger vs self.logger
AttributeError: 'QENewWalletWizard' object has no attribute 'logger'
2023-10-30 18:16:00 +00:00
ThomasV
56e80c20d7 wallet_db upgrade: do not use '/' in StoredDict keys 2023-09-23 11:05:36 +02:00
ThomasV
68159b3ef6 walletDB: replace 'manual_upgrades' parameter with 'upgrade', with opposite semantics 2023-09-22 15:02:07 +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
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
808f1877d2 wizard: allow slip39 for multisig
also, consistent single quoting of strings
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
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
314e3f958d qt: new wizard 2fa offline setup 2023-09-20 14:34:31 +02:00
Sander van Grieken
8663d89f77 qt: add HWW unlock wizardcomponent 2023-09-20 14:34:31 +02:00
Sander van Grieken
b072f5d243 wizard: typing 2023-09-20 14:34:31 +02:00
Sander van Grieken
83c2eb46bb qt: initial open existing wallet from wizard,
set window title for wizard dialogs,
catch RuntimeError for WizardComponent.updated signal, widget might be gone
2023-09-20 14:34:31 +02:00
Sander van Grieken
2a2459c649 qt: implement server picker in server connect wizard 2023-09-20 14:34:31 +02:00
Sander van Grieken
902290ee8c qt: multisig checks with hardware cosigners 2023-09-20 14:34:31 +02:00
Sander van Grieken
b7ed4c569b wip. trezor works for standard wallet, also for cosigners 2023-09-20 14:34:31 +02:00
Sander van Grieken
bcdacf3773 wizard: add passing of params in navmap to wizard pages 2023-09-20 14:34:30 +02:00
Sander van Grieken
a6caa3ffe9 wizard: fix wizard_data instance not isolated between pages,
combine is_bip39_seed and is_slip39_seed into cosigner aware needs_derivation_path
add instance id logging to wizard.log_stack()
qt: add updated signal to SeedLayout
2023-09-20 14:34:30 +02:00
Sander van Grieken
c485753ffd wizard: rename bip39_refine to script_and_derivation 2023-09-20 14:34:30 +02:00
Sander van Grieken
0222c93228 wizard: add support for slip39 2023-09-20 14:34:30 +02:00
Sander van Grieken
d395b97e83 qt: add have_master_key gui, implement cosigners in have_seed and bip39_refine guis
fix adding data from accept handler
2023-09-20 14:34:30 +02:00
Sander van Grieken
2407fab178 wizard: also push final state on the stack 2023-09-20 14:34:30 +02:00
Sander van Grieken
786eab9cfd wizard: cleanup, variable naming consistency, imports, invalid accept handler now raises 2023-09-20 14:34:30 +02:00
Sander van Grieken
9e096fbf1e wizard: remove view from is_last_view call, it's never used 2023-09-20 14:34:30 +02:00
SomberNight
7482e275b9 follow-up storage/db changes
follow-up b96cc82333
2023-08-22 14:50:30 +00:00
ThomasV
b96cc82333 Make storage a field of db
This comes from the jsonpatch_new branch.
I rather have in master now, because it touches a lot of filese.
2023-08-18 08:08:31 +02:00
Sander van Grieken
8cd95f1f7f qml: limit BIP39 cosigners script type to initial choice (bip39) or initial seed (electrum) 2023-06-02 09:46:53 +02:00
SomberNight
d2cf21fc2b qml wizard: enforce homogeneous master keys in multisig
- {xpub, Ypub, Zpub} categories cannot be mixed
- old mpk must not be used in multisig
2023-05-11 10:13:51 +00:00