URI: 
       tQt: ask confirmation before closing channel. - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 4e73318fadc864c8c4771303b40d94f6a427bbf1
   DIR parent 938d918e55767195ce039158b4d7337e72a8e448
  HTML Author: ThomasV <thomasv@electrum.org>
       Date:   Sat, 22 Feb 2020 10:40:39 +0100
       
       Qt: ask confirmation before closing channel.
       
       Diffstat:
         M electrum/gui/qt/channel_details.py  |       4 +++-
         M electrum/gui/qt/channels_list.py    |       3 +++
       
       2 files changed, 6 insertions(+), 1 deletion(-)
       ---
   DIR diff --git a/electrum/gui/qt/channel_details.py b/electrum/gui/qt/channel_details.py
       t@@ -11,6 +11,8 @@ from electrum.lnchannel import htlcsum
        from electrum.lnaddr import LnAddr, lndecode
        from electrum.bitcoin import COIN
        
       +from .util import Buttons, CloseButton
       +
        if TYPE_CHECKING:
            from .main_window import ElectrumWindow
        
       t@@ -151,6 +153,6 @@ class ChannelDetailsDialog(QtWidgets.QDialog):
                w.setModel(self.make_model(htlc_dict))
                w.header().setSectionResizeMode(0, QtWidgets.QHeaderView.ResizeToContents)
                vbox.addWidget(w)
       -
       +        vbox.addLayout(Buttons(CloseButton(self)))
                # initialize sent/received fields
                self.update_sent_received()
   DIR diff --git a/electrum/gui/qt/channels_list.py b/electrum/gui/qt/channels_list.py
       t@@ -81,6 +81,9 @@ class ChannelsList(MyTreeView):
                self.main_window.show_error('Failed to close channel:\n{}'.format(repr(e)))
        
            def close_channel(self, channel_id):
       +        msg = _('Close channel?')
       +        if not self.parent.question(msg):
       +            return
                def task():
                    coro = self.lnworker.close_channel(channel_id)
                    return self.network.run_from_another_thread(coro)