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
SomberNight
96f28607f2
keystore: "old"-type seeds cannot have a passphrase
...
related: https://github.com/spesmilo/electrum/pull/8906
2024-02-21 14:30:13 +00:00
SomberNight
7007a0c1c9
mnemonic: add type hints
2024-01-22 03:27:17 +00:00
Sander van Grieken
ec81f00896
trustedcoin: cannot reset OTP when seed is not available (online wallet creation continuation)
2024-01-15 17:45:29 +01:00
ThomasV
d6c45113e4
trustedcoin: do not db.write() from daemon thread. fixes #8791
2024-01-09 12:36:09 +01:00
Sander van Grieken
4c8287358a
qt, qml: remove email entry from 2FA wallet ToS pages
2023-12-08 12:07:03 +01: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
7080a7d8e2
qt: new wizard 2fa wallet online continuation from offline initial setup
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
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
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
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
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
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
43bac2edff
qml: use new wizard approach in qml and also implement 2FA/trustedcoin
2022-10-21 13:31:24 +02: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
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
SomberNight
4a4b0922e5
trustedcoin: (trivial) add a stub method in plugin base class
2020-05-29 20:51:52 +02:00
SomberNight
e6e587b7da
trustedcoin: use psbt format on wire. rm psbt to legacy tx conversion.
...
closes #6123
2020-05-29 18:58:30 +02:00
ThomasV
9a462ac9b5
trustedcoin: fix wallet constructor
2020-02-20 20:59:18 +01:00
SomberNight
07f5d6b745
keystore: 'get_tx_derivations' no longer public
2020-02-12 18:14:00 +01:00
ThomasV
e1ce3aace7
Separate db from storage
...
- storage is content-agnostic
- db and storage are passed to wallet contructor
2020-02-10 17:45:23 +01:00
SomberNight
c2b0039935
bitcoin.py: remove some remnants of TYPE_ADDRESS, TYPE_SCRIPT
2019-11-21 18:51:38 +01:00
SomberNight
bafe8a2fff
integrate PSBT support natively. WIP
2019-11-04 22:24:36 +01:00
SomberNight
04edad9984
config: no longer singleton. it is passed to Wallet.__init__
...
The few other cases that used SimpleConfig.get_instance() now
either get passed a config instance, or they try to get a reference
to something else that has a reference to a config.
(see lnsweep, qt/qrcodewidget, qt/qrtextedit)
2019-09-22 20:46:01 +02:00
ThomasV
16e293c289
follow-up cefa4762ba
2019-09-10 16:24:21 +02:00
SomberNight
99b83f7527
fix #5617
2019-09-04 13:53:38 +02:00
SomberNight
a42a773d19
storage: replace STO_EV_* ints with IntEnum
2019-09-04 13:31:49 +02:00
SomberNight
f60f690ca9
change many str(e) to repr(e) as some exceptions were cryptic
...
it's often valuable to see the type of the exception
(especially as for some exceptions str(e) == '')
2019-07-17 20:12:52 +02:00
SomberNight
3385a94753
logging: basics
2019-05-02 15:19:03 +02:00
SomberNight
1cfac928f9
trustedcoin: longer timeout for server signing
...
fixes #5221
2019-03-25 23:36:52 +01:00
SomberNight
a62bf2a53a
trustedcoin: better UX in Qt when cannot connect to TC server
...
closes #5184
2019-03-16 20:05:10 +01:00
ThomasV
cb9dcb8e26
load wallet plugin in Wallet factory, fix trustedcoin wizard on kivy
2019-02-28 09:02:58 +01:00
ThomasV
d5790ea109
wizard: do not use on storage object during wallet creation
2019-02-28 09:02:58 +01:00
SomberNight
072ce9c7ac
do not raise BaseException
2019-02-25 16:40:51 +01:00
SomberNight
85a7aa291e
bip32: refactor whole module. clean-up.
2019-02-22 18:50:24 +01:00
SomberNight
b39c51adf7
mv "electrum seed" stuff from bitcoin.py to mnemonic.py
2019-02-22 18:01:54 +01:00
SomberNight
9dedf51afd
trustedcoin: nicer 'ErrorConnectingServer' exception
2019-02-21 23:07:19 +01:00
SomberNight
d4e209dc3a
trustedcoin: print messages in both direction when debugging
2019-02-18 18:03:42 +01:00