1
0

qml: replace assert by exception

This commit is contained in:
Sander van Grieken
2023-03-31 15:03:44 +02:00
parent 0f541be6f1
commit cf2ba2a5bd

View File

@@ -632,10 +632,10 @@ class QEInvoiceParser(QEInvoice, QtEventListener):
# assure no shenanigans with the bolt11 invoice we get back
lninvoice = Invoice.from_bech32(invoice['pr'])
assert orig_amount * 1000 == lninvoice.amount_msat
if orig_amount * 1000 != lninvoice.amount_msat:
raise Exception('Unexpected amount in invoice, differs from lnurl-pay specified amount')
invoice = invoice['pr']
self.recipient = invoice
self.recipient = invoice['pr']
@pyqtSlot()
def save_invoice(self):