1
0

qml: fix display of negative millisat amounts in qefx.py for historic amounts too

This commit is contained in:
Sander van Grieken
2023-02-11 09:56:09 +01:00
parent b5f0be2d8d
commit 095b6dab0f

View File

@@ -118,7 +118,7 @@ class QEFX(QObject, QtEventListener):
@pyqtSlot(QEAmount, str, bool, result=str)
def fiatValueHistoric(self, satoshis, timestamp, plain=True):
if isinstance(satoshis, QEAmount):
satoshis = satoshis.msatsInt / 1000 if satoshis.msatsInt > 0 else satoshis.satsInt
satoshis = satoshis.msatsInt / 1000 if satoshis.msatsInt != 0 else satoshis.satsInt
else:
try:
sd = Decimal(satoshis)