Qt: allow to save invoices that have no amount
(such invoices are already saved by the QML GUI.)
This commit is contained in:
@@ -161,7 +161,8 @@ class BaseInvoice(StoredObject):
|
||||
Returns an integer satoshi amount, or '!' or None.
|
||||
Callers who need msat precision should call get_amount_msat()
|
||||
"""
|
||||
amount_msat = self.amount_msat
|
||||
# return strictly positive value or None
|
||||
amount_msat = self.amount_msat or None
|
||||
if amount_msat in [None, "!"]:
|
||||
return amount_msat
|
||||
return int(amount_msat // 1000)
|
||||
|
||||
Reference in New Issue
Block a user