Merge pull request #9672 from accumulator/qt_swaps_handle_usercancelled
qt: handle UserCancelled when initializing swapmanager and requesting…
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user