Commit Graph

18 Commits

Author SHA1 Message Date
SomberNight
7b095158bf wallet: add get_label_for_address, and make get_label private
fixes https://github.com/spesmilo/electrum/issues/7919

In the past, when creating payment requests, we keyed them by on-chain address,
and set/saved the msg of the request as label for the address.
Many places in the code were calling wallet.get_label(addr) with the expectation that
relevant payment requests are found and their message/description (if any) is considered.

wallet.get_label(key) is now made private, and instead the explicit non-polymorphic
wallet.get_label_for_{address,rhash,txid} alternatives should be used.
2022-08-09 17:21:14 +02:00
ThomasV
ad9030bd15 labels plugin: handle setting a label to None 2022-07-29 09:38:15 +02:00
SomberNight
c616c3bfad plugins/labels: better error message when using imported wallets
see #6703
2020-11-05 01:59:19 +01:00
SomberNight
4b6c86ecbe wallet: make labels private, and access to need lock
e.g. labels plugin iterated over wallet.labels on asyncio thread while user could trigger an edit from Qt thread
2020-10-13 18:57:55 +02:00
SomberNight
24221f8fca plugins: fix labels plugin FIXME re "just enabled plugin" 2020-05-25 17:31:13 +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
ThomasV
dbceed2647 Restructure wallet storage:
- Perform json deserializations in wallet_db
 - use StoredDict class that keeps tracks of its modifications
2020-02-04 13:35:58 +01: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
8c3ab63504 labels: don't dump trace if failed to connect to server 2019-03-22 17:24:52 +01:00
SomberNight
1f7b56b455 labels plugin: no need for 'proxy_set' callback 2019-03-09 17:13:06 +01:00
Janus
ec5f406f49 plugins: labels: dump response if malformed sync server response 2018-11-30 19:16:07 +01:00
SomberNight
e3b372946a rm aiosafe decorator. instead: log_exceptions and ignore_exceptions 2018-10-12 18:36:48 +02:00
SomberNight
c4f3fbaca0 labels: fix potential threading issues
also handle --offline
2018-09-25 21:23:44 +02:00
Janus
617103bb2a labels: fix saving single label 2018-09-06 18:30:24 +02:00
ThomasV
8fe066707a rm import 2018-09-06 17:47:10 +02:00
Janus
6e80ba7b4f asyncio: labels, crash_reporter, fx: migrate requests use to aiohttp 2018-09-06 16:18:45 +02:00
Janus
097ac144d9 file reorganization with top-level module 2018-07-13 14:01:37 +02:00