1
0

qml: do not display success if swap failed..

This commit is contained in:
ThomasV
2024-09-19 13:16:32 +02:00
parent 383f99796a
commit ad0b5453a3

View File

@@ -386,11 +386,15 @@ class QESwapHelper(AuthMixin, QObject, QtEventListener):
self.canCancel = True self.canCancel = True
txid = fut.result() txid = fut.result()
try: # swaphelper might be destroyed at this point try: # swaphelper might be destroyed at this point
self.userinfo = ' '.join([ if txid:
_('Success!'), self.userinfo = ' '.join([
messages.MSG_FORWARD_SWAP_FUNDING_MEMPOOL, _('Success!'),
]) messages.MSG_FORWARD_SWAP_FUNDING_MEMPOOL,
self.state = QESwapHelper.State.Success ])
self.state = QESwapHelper.State.Success
else:
self.userinfo = _('Swap failed!')
self.state = QESwapHelper.State.Failed
except RuntimeError: except RuntimeError:
pass pass
except concurrent.futures.CancelledError: except concurrent.futures.CancelledError: