1
0
Commit Graph

22 Commits

Author SHA1 Message Date
ThomasV
bae7f2490d Merge pull request #9846 from accumulator/qt_paytoedit_completer
qt: implement completer for PayToEdit
2025-05-21 09:52:57 +02:00
Sander van Grieken
b0c6674319 qt: implement completer for PayToEdit 2025-05-20 15:28:55 +02:00
f321x
61492d361e Use async dnspython methods for openalias/dnssec 2025-05-16 17:09:41 +02:00
f321x
b6e1e527c2 contacts: support lightning addressses as contact address
lightning addresses are useful and widely adopted, so it should be
possible to save them as payment identifier for a contact.
2025-05-15 17:55:23 +02:00
Sander van Grieken
db865f6f72 openalias: only consider TXT records, as DNS can return other records we did not ask for. 2024-10-08 11:58:34 +02:00
SomberNight
ccbac96f9a (trivial) contacts: add some type hints 2023-11-01 17:35:45 +00:00
SomberNight
612a8e6424 qt: fix: bip70 pay reqs need x509 verification
regression from https://github.com/spesmilo/electrum/pull/8462

- pr.verify() was called in qml, but not in qt gui
- we now call pr.verify() in get_payment_request(), to make the API less error-prone
- it is now ok to call pr.verify() multiple times, the result is cached
2023-07-10 17:50:53 +00:00
Sander van Grieken
7f766f6dfb payment_identifiers: also match local contacts 2023-07-07 22:54:46 +02:00
Sander van Grieken
3000b83ab5 contacts: use specific Exception when alias not found 2023-06-28 16:49:28 +02: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
312f2641e7 don't use bare except
use "except Exception", or if really needed explicitly "except BaseException"
2023-04-24 12:58:01 +00:00
SomberNight
01b5e3f8e0 flake8: enable more mandatory tests 2022-10-31 16:13:22 +00:00
SomberNight
649cad0122 lnurl: clean-up 2022-06-29 16:18:23 +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
ThomasV
fdee31af05 Qt settings_dialog: use signals
- changes must apply to all windows
 - do not keep reference to the window object
2022-04-29 17:04:16 +02:00
ThomasV
56f4932f10 import/exports to json files:
- fix #5737
 - add import/export or requests
2020-06-05 13:17:01 +02: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
3385a94753 logging: basics 2019-05-02 15:19:03 +02:00
Janus
5473320ce4 qt: use QStandardItemModel 2018-12-03 15:35:54 +01:00
SomberNight
f819e9b6f4 openalias: minor clean-up 2018-10-29 17:09:23 +01:00
SomberNight
1ef804c652 small import clean-up 2018-10-11 16:30:30 +02:00
Janus
097ac144d9 file reorganization with top-level module 2018-07-13 14:01:37 +02:00