electrum

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

commit 6aebc0fd5d88391fd5d6328ade609f459827ccbc
parent 1a05838ef21ff8eb69e7f25a1537346c0b8394f9
Author: Janus <ysangkok@gmail.com>
Date:   Thu, 29 Mar 2018 16:19:27 +0200

kivy: fix channel list error handling, close functionality for inactive channels

Diffstat:
Mgui/kivy/uix/dialogs/lightning_channels.py | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gui/kivy/uix/dialogs/lightning_channels.py b/gui/kivy/uix/dialogs/lightning_channels.py @@ -37,7 +37,7 @@ class LightningChannelsDialog(Factory.Popup): def close_channel(self, obj): print("asked to close channel", obj.channelPoint) - lightning.lightningCall(self.app.wallet.network.lightningrpc, "closechannel")(obj.channelPoint + (" --force" if not obj.active else "")) + lightning.lightningCall(self.app.wallet.network.lightningrpc, "closechannel")(*([obj.channelPoint] + (["--force"] if not obj.active else []))) def show_menu(self, obj): self.hide_menu() @@ -69,10 +69,13 @@ class LightningChannelsDialog(Factory.Popup): raise res channel_cards = self.ids.lightning_channels_container channel_cards.clear_widgets() - for i in res["channels"]: + if "channels" in res: + for i in res["channels"]: item = Factory.LightningChannelItem() item.screen = self print(i) - item.channelPoint = binascii.hexlify(bytes(reversed(bytes(bytearray.fromhex(i["channel_point"].split(":")[0]))))).decode("ascii") + item.channelPoint = i["channel_point"].split(":")[0] item.active = i["active"] channel_cards.add_widget(item) + else: + self.app.show_info(res)