Qt pay_lightning_invoice: handle NoDynamicFeeEstimates
`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
This commit is contained in:
@@ -686,7 +686,7 @@ class SendTab(QWidget, MessageBoxMixin, Logger):
|
||||
choices[3] = msg
|
||||
msg = _('You cannot pay that invoice using Lightning.')
|
||||
if self.wallet.lnworker.channels:
|
||||
msg += '\n' + _('Your channels can send {}.').format(self.format_amount(num_sats_can_send) + self.base_unit())
|
||||
msg += '\n' + _('Your channels can send {}.').format(self.format_amount(num_sats_can_send) + ' ' + self.base_unit())
|
||||
if not choices:
|
||||
self.window.show_error(msg)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user