qml: FormattedAmount: also update fiat when the amount instance changes
This commit is contained in:
@@ -41,9 +41,12 @@ GridLayout {
|
||||
}
|
||||
|
||||
function setFiatValue() {
|
||||
fiatLabel.text = '(' + Daemon.fx.fiatValue(amount) + ' ' + Daemon.fx.fiatCurrency + ')'
|
||||
if (showAlt)
|
||||
fiatLabel.text = '(' + Daemon.fx.fiatValue(amount) + ' ' + Daemon.fx.fiatCurrency + ')'
|
||||
}
|
||||
|
||||
onAmountChanged: setFiatValue()
|
||||
|
||||
Connections {
|
||||
target: Daemon.fx
|
||||
function onQuotesUpdated() { setFiatValue() }
|
||||
@@ -56,8 +59,5 @@ GridLayout {
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
if (showAlt)
|
||||
setFiatValue()
|
||||
}
|
||||
Component.onCompleted: setFiatValue()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user