[fix] bandit assert warnings (#3243)

Co-authored-by: dni  <office@dnilabs.com>
This commit is contained in:
Vlad Stan
2025-07-15 11:14:23 +02:00
committed by dni ⚡
co-authored by dni ⚡
parent 76ecf113c3
commit fa89313e6f
28 changed files with 196 additions and 220 deletions
+2 -1
View File
@@ -309,7 +309,8 @@ class NWCConnection:
self.account_private_key = secp256k1.PrivateKey(bytes.fromhex(secret))
self.account_private_key_hex = secret
self.account_public_key = self.account_private_key.pubkey
assert self.account_public_key
if not self.account_public_key:
raise ValueError("Missing account public key")
self.account_public_key_hex = self.account_public_key.serialize().hex()[2:]
# Extract service key (used for encryption to identify the nwc service provider)