electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit bb35e330fb47cf3ec46d4aadb7ff50167539faa9
parent 7ac1cace7a7caaa0d0cc32a1cb0a60c0ddc4c132
Author: ThomasV <thomasv@electrum.org>
Date:   Fri, 27 Mar 2020 11:19:27 +0100

do not show freeze/unfreeze channel options if channel is closed

Diffstat:
Melectrum/gui/qt/channels_list.py | 19+++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/electrum/gui/qt/channels_list.py b/electrum/gui/qt/channels_list.py @@ -145,16 +145,15 @@ class ChannelsList(MyTreeView): cc = self.add_copy_menu(menu, idx) cc.addAction(_("Long Channel ID"), lambda: self.place_text_on_clipboard(channel_id.hex(), title=_("Long Channel ID"))) - - if not chan.is_frozen_for_sending(): - menu.addAction(_("Freeze (for sending)"), lambda: chan.set_frozen_for_sending(True)) - else: - menu.addAction(_("Unfreeze (for sending)"), lambda: chan.set_frozen_for_sending(False)) - if not chan.is_frozen_for_receiving(): - menu.addAction(_("Freeze (for receiving)"), lambda: chan.set_frozen_for_receiving(True)) - else: - menu.addAction(_("Unfreeze (for receiving)"), lambda: chan.set_frozen_for_receiving(False)) - + if not chan.is_closed(): + if not chan.is_frozen_for_sending(): + menu.addAction(_("Freeze (for sending)"), lambda: chan.set_frozen_for_sending(True)) + else: + menu.addAction(_("Unfreeze (for sending)"), lambda: chan.set_frozen_for_sending(False)) + if not chan.is_frozen_for_receiving(): + menu.addAction(_("Freeze (for receiving)"), lambda: chan.set_frozen_for_receiving(True)) + else: + menu.addAction(_("Unfreeze (for receiving)"), lambda: chan.set_frozen_for_receiving(False)) funding_tx = self.parent.wallet.db.get_transaction(chan.funding_outpoint.txid) if funding_tx: