Skip to content

Commit

Permalink
qml: do not display success if swap failed..
Browse files Browse the repository at this point in the history
  • Loading branch information
ecdsa committed Sep 19, 2024
1 parent 383f997 commit ad0b545
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions electrum/gui/qml/qeswaphelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,11 +386,15 @@ def swap_task():
self.canCancel = True
txid = fut.result()
try: # swaphelper might be destroyed at this point
self.userinfo = ' '.join([
_('Success!'),
messages.MSG_FORWARD_SWAP_FUNDING_MEMPOOL,
])
self.state = QESwapHelper.State.Success
if txid:
self.userinfo = ' '.join([
_('Success!'),
messages.MSG_FORWARD_SWAP_FUNDING_MEMPOOL,
])
self.state = QESwapHelper.State.Success
else:
self.userinfo = _('Swap failed!')
self.state = QESwapHelper.State.Failed
except RuntimeError:
pass
except concurrent.futures.CancelledError:
Expand Down

0 comments on commit ad0b545

Please sign in to comment.