parse invoices with lightning: prefix

This commit is contained in:
ThomasV 2018-10-24 11:42:01 +02:00
parent 5ca6fbaea7
commit a5ab431b4b

View file

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