Commit Graph

92 Commits

Author SHA1 Message Date
Sander van Grieken be801f30e8 gui: make common_qt compatible with both Qt5 and Qt6 2023-11-07 10:17:10 +01:00
Sander van Grieken 6270eae5c9 qml: port PyQt5 to PyQt6 2023-11-07 10:16:18 +01:00
SomberNight 0273659e6e trustedcoin: fix keystore name (2)
follow-up 56e80c20d7
2023-10-17 14:33:05 +00:00
ThomasV 0a732a0b52 trustedcoin: fix keystore name (follow-up 56e80c20d7) 2023-10-17 10:00:17 +02:00
ThomasV 56e80c20d7 wallet_db upgrade: do not use '/' in StoredDict keys 2023-09-23 11:05:36 +02:00
Sander van Grieken f69316d1a6 trustedcoin: remove old wizard code 2023-09-20 14:34:31 +02:00
Sander van Grieken 0aebc1a31e qt+plugins: cleanup. remove all old wizard code 2023-09-20 14:34:31 +02:00
Sander van Grieken 1c7da01dae rename qt_common to common_qt 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 7080a7d8e2 qt: new wizard 2fa wallet online continuation from offline initial setup 2023-09-20 14:34:31 +02:00
Sander van Grieken eb8212ab77 qt: trustedcoin plugin helper scoping refactor 2023-09-20 14:34:31 +02:00
Sander van Grieken 65fee652c4 trustedcoin: ChoicesLayout -> ChoiceWidget 2023-09-20 14:34:31 +02:00
Sander van Grieken 7a2633b2de flake happifier 2023-09-20 14:34:31 +02:00
Sander van Grieken 3c232d70d1 small fixes 2023-09-20 14:34:31 +02:00
Sander van Grieken fd28c66670 qt: 2fa implement OTP check 2023-09-20 14:34:31 +02:00
Sander van Grieken 571d16314f qt: introduce electrum/gui/qt_common, implement remaining trustedcoin views,
unify most qml and qt wizard code for trustedcoin,
separate non-GUI trustedcoin wizard definition to trustedcoin.py
2023-09-20 14:34:31 +02:00
Sander van Grieken 15773086e5 qt: initial trustedcoin wizard pages 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 b45c84f24f remove the kivy gui
We now use the qml gui on Android, and haven't been maintaining
the kivy GUI for a while.
2023-08-30 16:47:37 +00: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 c068b80d78 qml: fix issues with 2fa, simplify terms and conditions retrieval code 2023-08-03 17:17:06 +02:00
Sander van Grieken b6863b4854 qml: add LabelSync toggle 2023-07-11 12:51:37 +02:00
SomberNight 87cba8bf32 trustedcoin: stricter client-side checks for 2fa fee 2023-06-13 16:52:50 +00:00
SomberNight 24980feab7 config: introduce ConfigVars
A new config API is introduced, and ~all of the codebase is adapted to it.
The old API is kept but mainly only for dynamic usage where its extra flexibility is needed.

Using examples, the old config API looked this:
```
>>> config.get("request_expiry", 86400)
604800
>>> config.set_key("request_expiry", 86400)
>>>
```

The new config API instead:
```
>>> config.WALLET_PAYREQ_EXPIRY_SECONDS
604800
>>> config.WALLET_PAYREQ_EXPIRY_SECONDS = 86400
>>>
```

The old API operated on arbitrary string keys, the new one uses
a static ~enum-like list of variables.

With the new API:
- there is a single centralised list of config variables, as opposed to
  these being scattered all over
- no more duplication of default values (in the getters)
- there is now some (minimal for now) type-validation/conversion for
  the config values

closes https://github.com/spesmilo/electrum/pull/5640
closes https://github.com/spesmilo/electrum/pull/5649

Note: there is yet a third API added here, for certain niche/abstract use-cases,
where we need a reference to the config variable itself.
It should only be used when needed:
```
>>> var = config.cv.WALLET_PAYREQ_EXPIRY_SECONDS
>>> var
<ConfigVarWithConfig key='request_expiry'>
>>> var.get()
604800
>>> var.set(3600)
>>> var.get_default_value()
86400
>>> var.is_set()
True
>>> var.is_modifiable()
True
```
2023-05-25 17:39:48 +00:00
SomberNight 03ab33f4b2 SimpleConfig: change API of set_key(): "save" is now kwarg-only 2023-05-25 17:37:16 +00:00
SomberNight e2406f21b4 fix flake8-bugbear B011
B011 Do not call assert False since python -O removes these calls. Instead callers should raise AssertionError().
2023-04-24 12:58:19 +00:00
SomberNight 312f2641e7 don't use bare except
use "except Exception", or if really needed explicitly "except BaseException"
2023-04-24 12:58:01 +00:00
Sander van Grieken 0ce3559d62 qml: trustedcoin icon in 2fas wizard disclaimer 2023-04-03 10:59:50 +02:00
Sander van Grieken 8528907a5b qml: trsutedcoin layout consistency 2023-03-17 11:51:56 +01:00
Sander van Grieken 0bb41a32c8 qml: fix layout issues in ShowConfirmOTP. fixes #8249 2023-03-17 00:23:50 +01:00
ThomasV f770905551 follow-up d56162c588 2023-03-14 17:28:33 +01:00
Sander van Grieken 5246f3d510 qml: refactor is_last checks to mostly lambdas, add multisig flow for 1st cosigner keystore,
add initial flow and view placeholders for additional cosigners.
2022-11-14 12:19:56 +01:00
Sander van Grieken 0c9d4abb82 qml: show 2FA status and billing info in WalletDetails, expose billing schedule setting in config 2022-11-04 13:35:15 +01:00
Sander van Grieken 28b5103d93 remove qml_test plugin, remove plugin settings test 2022-10-21 13:32:16 +02:00
Sander van Grieken c6496d02ef add recovery paths (disable and confirm/reset OTP) for 2FA 2022-10-21 13:32:16 +02:00
Sander van Grieken 255f508574 remove unused, add type checking imports 2022-10-21 13:32:16 +02:00
Sander van Grieken 20c95b26ea wip otp on pay 2022-10-21 13:32:13 +02:00
Sander van Grieken 43bac2edff qml: use new wizard approach in qml and also implement 2FA/trustedcoin 2022-10-21 13:31:24 +02:00
SomberNight 4b8790c919 qt 2fa: show different status-bar icon for "2fa disabled" wallet
related: https://github.com/spesmilo/electrum/issues/8018
2022-10-16 15:10:46 +00:00
SomberNight 98feff07ad threading.Thread: fix some DeprecationWarnings
"DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead"
2022-05-23 17:52:39 +02:00
Andrew Kozlik 0dce13a1dd Implement SLIP-0039 wallet recovery. 2021-04-30 19:55:47 +02:00
ThomasV 2c39f0c9c4 fix #7190 2021-04-08 15:12:32 +02:00
ThomasV 774a9ad263 fix #7164 2021-04-01 14:42:52 +02:00
ThomasV 641968fcf8 Wizard: do not ask seed type, default to segwit
segwit addresses are widely supported today.
2021-01-12 11:03:21 +01:00
SomberNight d1302d3384 mnemonic: tighten seed_type check for old "2fa" type seeds
Seeds in the set difference could already not be restored: they raised
an exception in the wizard; now these are not recognised as valid seeds
anymore (so e.g. OK button in wizard will be disabled).
Also see comments in code.
2020-12-10 14:36:31 +01:00
SomberNight 1851ec962f trustedcoin: fix two-step wallet creation (offline->online)
got broken in c46fbf08a5
2020-12-09 18:31:08 +01:00
SomberNight 95b08e9961 plugins: remove 'on_new_window' hook 2020-12-08 10:33:43 +01:00
SomberNight 933d8861ce mnemonic.make_seed: de-duplicate num_bits default magic number 2020-12-08 10:00:34 +01:00
ThomasV 427779350f Trustedcoin: call wizard.terminate with aborted set to True in various failure conditions (see #4496) 2020-11-29 11:43:33 +01:00