fix hexlify bytes -> str.

This commit is contained in:
fiatjaf
2019-12-14 17:35:35 -03:00
parent 463ee21c9f
commit 1812b4a803
2 changed files with 26 additions and 25 deletions
+2 -2
View File
@@ -49,9 +49,9 @@ def decode(pr: str) -> Invoice:
if tag == "d":
invoice.description = trim_to_bytes(tagdata).decode("utf-8")
elif tag == "h" and data_length == 52:
invoice.description = hexlify(trim_to_bytes(tagdata))
invoice.description = str(hexlify(trim_to_bytes(tagdata)))
elif tag == "p" and data_length == 52:
invoice.payment_hash = hexlify(trim_to_bytes(tagdata))
invoice.payment_hash = str(hexlify(trim_to_bytes(tagdata)))
return invoice