bug in log

This commit is contained in:
2026-04-09 05:02:21 -04:00
parent dff508c25b
commit b55493221d
5 changed files with 40 additions and 26 deletions

13
util.py
View File

@@ -494,3 +494,16 @@ class Util:
del will[txid]["tx_fees"]
have_to_update = True
return have_to_update
def text_to_hex(text: str) -> str:
"""Convert text to hexadecimal string"""
hex_string = text.encode('utf-8').hex()
return hex_string
def hex_to_text(hex_string: str) -> str:
"""Convert hexadecimal string back to text (for verification)"""
try:
return bytes.fromhex(hex_string).decode('utf-8')
except Exception:
return "Error: Invalid hex string"