1
0

handle swap exception more gracefully

remove redundant Nne

handle reverse swap exception more gracefully

change reverse swap error

handle reverse swap exception more gracefully
This commit is contained in:
f321x
2025-01-20 17:29:36 +01:00
parent 142f1d55e4
commit 18d3d26b8d

View File

@@ -270,8 +270,12 @@ class SwapDialog(WindowModalDialog, QtEventListener):
expected_onchain_amount_sat=onchain_amount + self.swap_manager.get_claim_fee(),
zeroconf=self.zeroconf,
)
# we must not leave the context, so we use run_couroutine_dialog
funding_txid = self.window.run_coroutine_dialog(coro, _('Initiating swap...'))
try:
# we must not leave the context, so we use run_couroutine_dialog
funding_txid = self.window.run_coroutine_dialog(coro, _('Initiating swap...'))
except Exception as e:
self.window.show_error(f"Reverse swap failed: {str(e)}")
return
self.window.on_swap_result(funding_txid, is_reverse=True)
return True
else: