1
0
This commit is contained in:
ThomasV
2023-03-20 11:09:18 +01:00
parent 2e797b4d77
commit 4fa192d9e7
3 changed files with 9 additions and 6 deletions

View File

@@ -161,8 +161,7 @@ class BaseInvoice(StoredObject):
Returns an integer satoshi amount, or '!' or None.
Callers who need msat precision should call get_amount_msat()
"""
# return strictly positive value or None
amount_msat = self.amount_msat or None
amount_msat = self.amount_msat
if amount_msat in [None, "!"]:
return amount_msat
return int(amount_msat // 1000)