1
0

Merge pull request #9461 from f321x/fix_rswap_exception

Handle reverse swap exception more gracefully
This commit is contained in:
accumulator
2025-01-20 22:48:24 +01:00
committed by GitHub

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: