E203, E221

This commit is contained in:
dni ⚡
2023-04-17 08:16:59 +02:00
parent 4a72a5b6b3
commit 1ac9d2572d
6 changed files with 6 additions and 10 deletions
+2 -2
View File
@@ -50,7 +50,7 @@ def decode(pr: str) -> Invoice:
raise ValueError("Too short to contain signature")
# extract the signature
signature = bitarray[-65 * 8 :].tobytes()
signature = bitarray[-65 * 8:].tobytes()
# the tagged fields as a bitstream
data = bitstring.ConstBitStream(bitarray[: -65 * 8])
@@ -61,7 +61,7 @@ def decode(pr: str) -> Invoice:
# decode the amount from the hrp
m = re.search(r"[^\d]+", hrp[2:])
if m:
amountstr = hrp[2 + m.end() :]
amountstr = hrp[2 + m.end():]
if amountstr != "":
invoice.amount_msat = _unshorten_amount(amountstr)