1
0

submarine swaps: use a short expiry with hold invoices, and display result to the user

This commit is contained in:
ThomasV
2023-08-30 11:07:16 +02:00
parent 4d0ec8d177
commit 78f0f788d6
2 changed files with 26 additions and 5 deletions

View File

@@ -325,7 +325,15 @@ class SwapDialog(WindowModalDialog, QtEventListener):
tx=tx,
channels=self.channels,
)
self.window.run_coroutine_from_thread(coro, _('Swapping funds'))
def on_result(txid):
msg = _("Submarine swap") + ': ' + (_("Success") if txid else _("Expired")) + '\n'
if txid:
msg += _("Funding transaction") + ': ' + txid + '\n'
msg += _("Please remain online until your transaction is confirmed")
else:
msg += _("The server failed to send lightning funds to you")
self.window.show_error_signal.emit(msg)
self.window.run_coroutine_from_thread(coro, _('Swapping funds'), on_result=on_result)
def get_description(self):
onchain_funds = "onchain funds"