Browse Source

qml: replace assert by exception

master
Sander van Grieken 3 years ago
parent
commit
cf2ba2a5bd
  1. 6
      electrum/gui/qml/qeinvoice.py

6
electrum/gui/qml/qeinvoice.py

@ -632,10 +632,10 @@ class QEInvoiceParser(QEInvoice, QtEventListener):
# assure no shenanigans with the bolt11 invoice we get back # assure no shenanigans with the bolt11 invoice we get back
lninvoice = Invoice.from_bech32(invoice['pr']) 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['pr']
self.recipient = invoice
@pyqtSlot() @pyqtSlot()
def save_invoice(self): def save_invoice(self):

Loading…
Cancel
Save