From 3590385fa22b43aee0572fb5d87191d857782c7f Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Wed, 19 Oct 2022 14:50:38 +0200 Subject: [PATCH] Revert "only create lightning invoice if the wallet has channels in a suitable state" This reverts commit 717b6dd5fb6a2eb671d295c639a9577215dc8656. --- electrum/wallet.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/electrum/wallet.py b/electrum/wallet.py index cc00d3772..949181008 100644 --- a/electrum/wallet.py +++ b/electrum/wallet.py @@ -81,7 +81,6 @@ from .interface import NetworkException from .mnemonic import Mnemonic from .logging import get_logger, Logger from .lnworker import LNWallet -from .lnchannel import ChannelState from .paymentrequest import PaymentRequest from .util import read_json_file, write_json_file, UserFacingException, FileImportFailed from .util import EventListener, event_listener @@ -2480,8 +2479,7 @@ class Abstract_Wallet(ABC, Logger, EventListener): exp_delay = exp_delay or 0 timestamp = int(time.time()) fallback_address = address if self.config.get('bolt11_fallback', True) else None - lightning = self.has_lightning() and self.lnworker.channels \ - and any([c.get_state() <= ChannelState.OPEN for c in self.lnworker.channels]) + lightning = self.has_lightning() if lightning: lightning_invoice = self.lnworker.add_request( amount_sat=amount_sat,