qt/channels list: show error in dialog

This commit is contained in:
SomberNight 2018-07-16 17:45:51 +02:00 committed by ThomasV
parent 66817d41f9
commit f2242868fa

View file

@ -34,9 +34,8 @@ class ChannelsList(MyTreeWidget):
def close():
suc, msg = self.parent.wallet.lnworker.close_channel(channel_id)
if not suc:
print('channel close broadcast failed:', msg)
assert suc # TODO show error message in dialog
menu.addAction(_("Close channel"), close)
self.main_window.show_error('Force-close failed:\n{}'.format(msg))
menu.addAction(_("Force-close channel"), close)
menu.exec_(self.viewport().mapToGlobal(position))
@QtCore.pyqtSlot(HTLCStateMachine)