From 46cf18ce5f3867a6fa450d65fbf5923473ea75a3 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Thu, 11 Oct 2018 18:28:38 +0200 Subject: [PATCH] open_channel: improved success message --- electrum/gui/qt/main_window.py | 9 ++++++--- electrum/lnworker.py | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py index 7322ffe7a..4d5da8bee 100644 --- a/electrum/gui/qt/main_window.py +++ b/electrum/gui/qt/main_window.py @@ -1854,9 +1854,12 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): def open_channel(self, *args, **kwargs): def task(): return self.wallet.lnworker.open_channel(*args, **kwargs) - def on_success(result): - print(result) - self.show_message(_('Channel open')) + def on_success(chan): + self.show_message('\n'.join([ + _('Channel established.'), + _('Remote peer ID') + ':' + bh2u(chan.node_id), + _('This channel will be usable after 3 confirmations') + ])) WaitingDialog(self, _('Opening channel...'), task, on_success, self.on_error) def query_choice(self, msg, choices): diff --git a/electrum/lnworker.py b/electrum/lnworker.py index 4ac8e69f1..081489b1b 100644 --- a/electrum/lnworker.py +++ b/electrum/lnworker.py @@ -200,6 +200,7 @@ class LNWorker(PrintError): self.save_channel(chan) self.network.lnwatcher.watch_channel(chan.get_funding_address(), chan.funding_outpoint.to_str()) self.on_channels_updated() + return chan def on_channels_updated(self): self.network.trigger_callback('channels')