Browse Source

qml: do not display success if swap failed..

master
ThomasV 1 year ago
parent
commit
ad0b5453a3
  1. 14
      electrum/gui/qml/qeswaphelper.py

14
electrum/gui/qml/qeswaphelper.py

@ -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:

Loading…
Cancel
Save