Fix get_pending_swaps: use both funding and spending tx heights
Also, do not show closing warnings if we are offline.
This commit is contained in:
@@ -2699,7 +2699,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener):
|
||||
warning = ''.join([
|
||||
_("Are you sure you want to close Electrum?"),
|
||||
'\n\n',
|
||||
_("An ongoing operation prevents Electrum from closing:"),
|
||||
_("An ongoing operation requires you to stay online."),
|
||||
'\n',
|
||||
warning
|
||||
])
|
||||
@@ -2734,6 +2734,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener):
|
||||
"""Callback that will return a warning string if there are unconfirmed swap funding txs."""
|
||||
if not (self.wallet.has_lightning() and self.wallet.lnworker.swap_manager):
|
||||
return None
|
||||
if not self.network:
|
||||
return None
|
||||
if ongoing_swaps := self.wallet.lnworker.swap_manager.get_pending_swaps():
|
||||
return "".join((
|
||||
f"{str(len(ongoing_swaps))} ",
|
||||
|
||||
Reference in New Issue
Block a user