qml: fix display of negative millisat amounts in FormattedAmount, qefx.py
This commit is contained in:
@@ -24,7 +24,7 @@ GridLayout {
|
||||
}
|
||||
Label {
|
||||
visible: valid
|
||||
text: amount.msatsInt > 0 ? Config.formatMilliSats(amount) : Config.formatSats(amount)
|
||||
text: amount.msatsInt != 0 ? Config.formatMilliSats(amount) : Config.formatSats(amount)
|
||||
font.family: FixedFont
|
||||
}
|
||||
Label {
|
||||
|
||||
@@ -101,7 +101,7 @@ class QEFX(QObject, QtEventListener):
|
||||
def fiatValue(self, satoshis, plain=True):
|
||||
rate = self.fx.exchange_rate()
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user