diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py index 92c013fec..40b6aaf79 100644 --- a/electrum/gui/qt/main_window.py +++ b/electrum/gui/qt/main_window.py @@ -3360,8 +3360,6 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): self.wallet.thread.stop() if self.network: self.network.unregister_callback(self.on_network) - self.network.unregister_callback(self.on_quotes) - self.network.unregister_callback(self.on_history) self.config.set_key("is_maximized", self.isMaximized()) if not self.isMaximized(): g = self.geometry() diff --git a/electrum/lnrouter.py b/electrum/lnrouter.py index 772471062..ba4b709c1 100644 --- a/electrum/lnrouter.py +++ b/electrum/lnrouter.py @@ -354,7 +354,7 @@ class ChannelDB(JsonDB): def capacity(self): # capacity of the network - return sum(c.capacity_sat for c in self._id_to_channel_info.values()) + return sum(c.capacity_sat for c in self._id_to_channel_info.values() if c.capacity_sat is not None) def get_channel_info(self, channel_id: bytes) -> Optional[ChannelInfo]: return self._id_to_channel_info.get(channel_id, None)