From eb00012c951e10855841d9e9daa19125cb3c04a2 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Wed, 19 Oct 2022 16:15:12 +0000 Subject: [PATCH] invoices: fix is_paid for zero-amount onchain pay reqs fixes https://github.com/spesmilo/electrum/issues/8022 --- electrum/invoices.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/electrum/invoices.py b/electrum/invoices.py index 03bea6e9b..c7308f206 100644 --- a/electrum/invoices.py +++ b/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