qml: fix display of negative millisat amounts in FormattedAmount, qefx.py
This commit is contained in:
@@ -24,7 +24,7 @@ GridLayout {
|
|||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
visible: valid
|
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
|
font.family: FixedFont
|
||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ class QEFX(QObject, QtEventListener):
|
|||||||
def fiatValue(self, satoshis, plain=True):
|
def fiatValue(self, satoshis, plain=True):
|
||||||
rate = self.fx.exchange_rate()
|
rate = self.fx.exchange_rate()
|
||||||
if isinstance(satoshis, QEAmount):
|
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:
|
else:
|
||||||
try:
|
try:
|
||||||
sd = Decimal(satoshis)
|
sd = Decimal(satoshis)
|
||||||
|
|||||||
Reference in New Issue
Block a user