From 0b2db9ca46f05fecd8a3cfc42dd42b09f37d417e Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Tue, 31 Jan 2023 15:52:31 +0100 Subject: [PATCH] qml: FormattedAmount: also update fiat when the amount instance changes --- .../gui/qml/components/controls/FormattedAmount.qml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/electrum/gui/qml/components/controls/FormattedAmount.qml b/electrum/gui/qml/components/controls/FormattedAmount.qml index cafc3d3c3..52327d7ff 100644 --- a/electrum/gui/qml/components/controls/FormattedAmount.qml +++ b/electrum/gui/qml/components/controls/FormattedAmount.qml @@ -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() }