qt: handle UserCancelled when initializing swapmanager and requesting swap invoice
when sending change to lightning
This commit is contained in:
@@ -1228,6 +1228,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener):
|
|||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
self.run_coroutine_dialog(wait_until_initialized(), _('Please wait...'))
|
self.run_coroutine_dialog(wait_until_initialized(), _('Please wait...'))
|
||||||
|
except UserCancelled:
|
||||||
|
return False
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.show_error(str(e))
|
self.show_error(str(e))
|
||||||
return False
|
return False
|
||||||
|
|||||||
@@ -345,6 +345,8 @@ class SendTab(QWidget, MessageBoxMixin, Logger):
|
|||||||
except SwapServerError as e:
|
except SwapServerError as e:
|
||||||
self.show_error(str(e))
|
self.show_error(str(e))
|
||||||
return
|
return
|
||||||
|
except UserCancelled:
|
||||||
|
return
|
||||||
tx.replace_output_address(DummyAddress.SWAP, swap.lockup_address)
|
tx.replace_output_address(DummyAddress.SWAP, swap.lockup_address)
|
||||||
assert tx.get_dummy_output(DummyAddress.SWAP) is None
|
assert tx.get_dummy_output(DummyAddress.SWAP) is None
|
||||||
tx.swap_invoice = invoice
|
tx.swap_invoice = invoice
|
||||||
|
|||||||
Reference in New Issue
Block a user