ref https://github.com/spesmilo/electrum/pull/9189
```
Traceback (most recent call last):
File "/home/user/wspace/electrum/electrum/gui/qt/my_treeview.py", line 166, in on_commitData
self.tv.on_edited(idx, edit_key=edit_key, text=new_text)
File "/home/user/wspace/electrum/electrum/gui/qt/history_list.py", line 699, in on_edited
self.hm.update_fiat(index)
File "/home/user/wspace/electrum/electrum/gui/qt/history_list.py", line 371, in update_fiat
self.dataChanged.emit(idx, idx, [Qt.ItemDataRole.DisplayRole, Qt.ForegroundRole])
AttributeError: type object 'Qt' has no attribute 'ForegroundRole'
```
The qtmultimedia-based qrreader has the concept of "strong_count":
before the scanner returns a decoded qr code result, it waits until
it has seen at least "strong_count" (e.g. 10) frames in which the qr code was seen and successfully decoded.
I think the idea might have been to reduce false positives, mis-decoding qr codes from bad frames.
However in practice it makes scanning even moderately sized qr codes really difficult for the user:
it takes several seconds (at least on my laptop cam) to obtain enough "clear" frames that count into the strong_count.
So I am lowering the strong_count to 2, down from CAMERA_FPS/3,
which makes it easier to scan, and I still haven't seen false positives even with this value.
storage encryption.
The password will be needed on startup with anchor channels.
Note that it remains possible to use non-encrypted storage
and keystore encryption with the command line.
- Separation between SwapManager and its transport:
Legacy transpport uses http, Nostr uses websockets
- The transport uses a context to open/close connections.
This context is not async, because it needs to be called
from the GUI
- Swapserver fees values are initialized to None instead
of 0, so that any attempt to use them before the swap
manager is initialized will raise an exception.
- Remove swapserver fees disk caching (swap_pairs file)
- Regtests use http transport
- Android uses http transport (until QML is ready)
e.g. if you consolidate own utxos, the "amount sent" in the dialog is zero,
but for high fee warnings that's not the amount we should be comparing against
This will be useful if we decide to ship lntransport as a separate
package. It is also a conceptual cleanup.
Notes:
- lntransport still requires crypto.py
- parsing node id from a bolt11 invoice is not supported.
If you closed a main_window soon after opening it, and the UpdateCheckThread network request was slow
and still in progress, the gui would freeze until the network request finished.
RunCoroutineDialog has a run() method that blocks the thread
without blocking the GUI (using exec), and a Cancel button
that cancels the coroutine.
main_window.run_coroutine_dialog() is a wrapper that returns
the coroutine result and may raise exceptions.
BlockingWaitingDialog was removed is transaction_dialog,
where it was not particularly useful.