Browse Source

invoices: fix is_paid for zero-amount onchain pay reqs

fixes https://github.com/spesmilo/electrum/issues/8022
patch-4
SomberNight 2 years ago
parent
commit
eb00012c95
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 5
      electrum/invoices.py

5
electrum/invoices.py

@ -128,7 +128,10 @@ class Invoice(StoredObject):
if self.is_lightning():
address = self.get_address()
amount = self.get_amount_sat()
outputs = [PartialTxOutput.from_address_and_value(address, int(amount))] if address and amount else []
if address and amount is not None:
outputs = [PartialTxOutput.from_address_and_value(address, int(amount))]
else:
outputs = []
else:
outputs = self.outputs
return outputs

Loading…
Cancel
Save