diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py index 4584be42c..f51da149d 100644 --- a/electrum/gui/qt/main_window.py +++ b/electrum/gui/qt/main_window.py @@ -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 diff --git a/electrum/gui/qt/send_tab.py b/electrum/gui/qt/send_tab.py index 4042c9b07..93620b0d5 100644 --- a/electrum/gui/qt/send_tab.py +++ b/electrum/gui/qt/send_tab.py @@ -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