In particular, window.timer_actions() calls
request_list.refresh_all() and invoice_list.refresh_all(),
every 0.5 seconds.
We avoid doing this at least when those lists are not visible anyway.
```
Traceback (most recent call last):
File "/home/user/wspace/electrum/electrum/gui/qt/invoice_list.py", line 169, in <lambda>
menu.addAction(_("Pay") + "...", lambda: self.send_tab.do_pay_invoice(invoice))
File "/home/user/wspace/electrum/electrum/gui/qt/send_tab.py", line 585, in do_pay_invoice
self.pay_onchain_dialog(self.window.get_coins(), invoice.outputs)
File "/home/user/wspace/electrum/electrum/gui/qt/send_tab.py", line 271, in pay_onchain_dialog
preview_dlg = PreviewTxDialog(
File "/home/user/wspace/electrum/electrum/gui/qt/transaction_dialog.py", line 962, in __init__
self.update()
File "/home/user/wspace/electrum/electrum/gui/qt/transaction_dialog.py", line 658, in update
self.io_widget.update(self.tx)
File "/home/user/wspace/electrum/electrum/gui/qt/transaction_dialog.py", line 212, in update
tx_height, tx_pos = self.wallet.adb.get_txpos(self.tx.txid())
File "/home/user/wspace/electrum/electrum/address_synchronizer.py", line 483, in get_txpos
verified_tx_mined_info = self.db.get_verified_tx(tx_hash)
File "/home/user/wspace/electrum/electrum/json_db.py", line 44, in wrapper
return func(self, *args, **kwargs)
File "/home/user/wspace/electrum/electrum/wallet_db.py", line 1256, in get_verified_tx
assert isinstance(txid, str)
AssertionError
```
textedit.setMinimumWidth(950) (from 5af399d19639b0c141398db964270c4974f124acdoes) does not play well with the tx_dlg.setMinimumWidth(640)
when resizing. Make 950 only affect the default sizing of the textedit.
- this widget will be used in various dialogs
- making this change now will prevent downstream conflicts
- the part that displays "coin selection active" was commented out
ShortIDs were originally designed for lightning channels, and are now
understood by some block explorers.
This allows to remove one column in the UTXO tab (height is redundant).
In the transaction dialog, the space saving ensures that all inputs fit
into one line (it was not the case previously with p2wsh addresses).
For clarity and consistency, the ShortID is displayed for both inputs
and outputs in the transaction dialog.
- save remote alias for use in invoices
- derive local alias from wallet xpub
- send channel_type without the option_scid_alias bit
(apparently LND does not like it)
Always use "." as decimal point, and " " as thousands separator.
Previously,
- for decimal point, we were using
- "." in some places (e.g. AmountEdit, most fiat amounts), and
- `locale.localeconv()['decimal_point']` in others.
- for thousands separator, we were using
- "," in some places (most fiat amounts), and
- " " in others (format_satoshis)
I think it is better to be consistent even if whatever we pick differs from the locale.
Using whitespace for thousands separator (vs comma) is probably less confusing for people
whose locale would user "." for ts and "," for dp (as in e.g. German).
The alternative option would be to always use the locale. Even if we decide to do that later,
this refactoring should be useful.
closes https://github.com/spesmilo/electrum/issues/2629
- replace complex strategies with a simpler choice,
between preserving or decreasing the payment.
- Always expose that choice to the user.
- Show the resulting fees to the user before they click OK
preference from the GUI, because the mempoolfullrbf option in
Bitcoin 0.24 makes RBF signaling pretty meaningless. Fixes#8088.
Note: RBF remains disabled for channel funding transactions.
In that case, the flag is actually only used as a semaphore
between different instances of the same wallet.
This was a regression from 2a31f80d09,
before which, when using the default `QRCodeWidget()` constructor,
there had been a min size set on the widget. I like that old behaviour:
reasonable size should be set by default, and if you want to set the
size manually, opt-in to that.
fixes https://github.com/spesmilo/electrum/issues/8071
Given a wallet with LN disabled,
and a bolt11 invoice (or a bip21 uri that only contains bolt11 but lacks a top-level address),
if the bolt11 invoice includes a fallback address,
we would previously just error "Lightning is disabled".
Now we offer the user to pay on-chain using the fallback address.
closes https://github.com/spesmilo/electrum/issues/8047
* add invoice status to invoice_status callback
* debug statement fails tests
* removed commented lines, added progress/attempt counter comment in lnworker.pay_to_node,
and update the invoice_status event handler in qeinvoicelistmodel.py
window.run_coroutine_from_thread starts a coroutine on the asyncio loop,
which, when finishing, pops from the dict.
The for loop in clean_up is running on the Qt thread.
fixes https://github.com/spesmilo/electrum/issues/7983
Replace get_key_for_outgoing_invoice, get_key_for_incoming_request
with Invoice.get_id()
When a new request is created, reuse addresses of expired requests (fixes#7927)
The API is changed for the following commands:
get_request, get_invoice,
list_requests, list_invoices,
delete_request, delete_invoice
`wallet.make_unsigned_transaction` can raise NotEnoughFunds or NoDynamicFeeEstimates.
These are "expected" exceptions that need to be handled or worked around. Added a note
of this in the docstring now.
We now handle NoDynamicFeeEstimates by allowing a static fallback fee in
`wallet.can_pay_onchain` and `lnworker.suggest_funding_amount`. It should be
fine to have a static fallback in these cases, as the user still has a chance
to set their own fee later in the flow.
(though ofc the static fallback might be too high in some mempool conditions,
in which case e.g. can_pay_onchain might return a false-negative, but this
is still an improvement over raising I believe)
fixes https://github.com/spesmilo/electrum/issues/5784