From 47d14c579b0e49cd1c29c416a6b3f69f5bd9fd9e Mon Sep 17 00:00:00 2001 From: ThomasV Date: Thu, 20 Feb 2020 21:01:42 +0100 Subject: [PATCH] minor fix: can_send, can_receive --- electrum/lnworker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/electrum/lnworker.py b/electrum/lnworker.py index 8237e805c..509be177e 100644 --- a/electrum/lnworker.py +++ b/electrum/lnworker.py @@ -1167,11 +1167,11 @@ class LNWallet(LNWorker): def can_send(self): with self.lock: - return Decimal(max(chan.available_to_spend(LOCAL) if chan.is_open() else 0 for chan in self.channels.values()))/1000 + return Decimal(max(chan.available_to_spend(LOCAL) if chan.is_open() else 0 for chan in self.channels.values()))/1000 if self.channels else 0 def can_receive(self): with self.lock: - return Decimal(max(chan.available_to_spend(REMOTE) if chan.is_open() else 0 for chan in self.channels.values()))/1000 + return Decimal(max(chan.available_to_spend(REMOTE) if chan.is_open() else 0 for chan in self.channels.values()))/1000 if self.channels else 0 async def close_channel(self, chan_id): chan = self.channels[chan_id]