Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lnaddr.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def unshorten_amount(amount):
# BOLT #11:
# A reader SHOULD fail if `amount` contains a non-digit, or is followed by
# anything except a `multiplier` in the table above.
if not re.fullmatch("\d+[pnum]?", str(amount)):
if not re.fullmatch(r"\d+[pnum]?", str(amount)):
raise ValueError("Invalid amount '{}'".format(amount))

if unit in units.keys():
Expand Down Expand Up @@ -270,7 +270,7 @@ def lndecode(a, verbose=False):
addr = LnAddr()
addr.pubkey = None

m = re.search("[^\d]+", hrp[2:])
m = re.search(r"[^\d]+", hrp[2:])
if m:
addr.currency = m.group(0)
amountstr = hrp[2+m.end():]
Expand Down