payment_identifier: if a bip21 uri contains a lightning invoice without fallback address,
and an address is present in the bip21 uri path, register the on-chain address in the Invoice.outputs field to allow paying onchain from a saved Invoice later (when the PI is unavailable). Fixes #8654
This commit is contained in:
@@ -304,7 +304,7 @@ class Invoice(BaseInvoice):
|
||||
|
||||
def can_be_paid_onchain(self) -> bool:
|
||||
if self.is_lightning():
|
||||
return bool(self._lnaddr.get_fallback_address())
|
||||
return bool(self._lnaddr.get_fallback_address()) or (bool(self.outputs))
|
||||
else:
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user