1
0

Merge pull request #9672 from accumulator/qt_swaps_handle_usercancelled

qt: handle UserCancelled when initializing swapmanager and requesting…
This commit is contained in:
accumulator
2025-03-27 13:30:49 +01:00
committed by GitHub
2 changed files with 4 additions and 0 deletions

View File

@@ -1228,6 +1228,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener):
return
try:
self.run_coroutine_dialog(wait_until_initialized(), _('Please wait...'))
except UserCancelled:
return False
except Exception as e:
self.show_error(str(e))
return False

View File

@@ -345,6 +345,8 @@ class SendTab(QWidget, MessageBoxMixin, Logger):
except SwapServerError as e:
self.show_error(str(e))
return
except UserCancelled:
return
tx.replace_output_address(DummyAddress.SWAP, swap.lockup_address)
assert tx.get_dummy_output(DummyAddress.SWAP) is None
tx.swap_invoice = invoice