1
0

Anchor channels: require deterministic wallet with software keystore.

This ends LN support in hardware and watching-only wallets.
This commit is contained in:
ThomasV
2024-12-18 11:02:40 +01:00
parent ee42e09387
commit ac1c9f088d

View File

@@ -509,11 +509,15 @@ class Abstract_Wallet(ABC, Logger, EventListener):
return self.config.ENABLE_ANCHOR_CHANNELS and self.has_channels()
def can_have_lightning(self) -> bool:
# we want static_remotekey to be a wallet address
return self.txin_type == 'p2wpkh'
if self.config.ENABLE_ANCHOR_CHANNELS:
# this excludes hardware wallets, watching-only wallets
return self.can_have_deterministic_lightning()
else:
# we want static_remotekey to be a wallet address
return self.txin_type == 'p2wpkh'
def can_have_deterministic_lightning(self) -> bool:
if not self.can_have_lightning():
if not self.txin_type == 'p2wpkh':
return False
if not self.keystore:
return False