1
0

make parsing lightning qr codes more robust

This commit is contained in:
ThomasV
2019-08-27 17:12:43 +02:00
parent 31a18f83f1
commit 3076eb75ea
2 changed files with 12 additions and 9 deletions

View File

@@ -131,12 +131,12 @@ class PayToEdit(CompletionTextEdit, ScanQRTextEdit, Logger):
if data.startswith("bitcoin:"):
self.win.pay_to_URI(data)
return
l = data.lower()
if l.startswith("lightning:"):
data = l[10:]
if data.startswith("ln"):
self.win.parse_lightning_invoice(data)
self.lightning_invoice = data
lower = data.lower()
if lower.startswith("lightning:ln"):
lower = lower[10:]
if lower.startswith("ln"):
self.win.parse_lightning_invoice(lower)
self.lightning_invoice = lower
return
try:
self.payto_address = self.parse_output(data)