From 6d67f51e44eefe90f6620eda026f56504e718bfc Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Thu, 16 Mar 2023 11:29:07 +0100 Subject: [PATCH] qml: show fiat state only for non-lightning wallets --- electrum/gui/qml/components/controls/BalanceSummary.qml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/electrum/gui/qml/components/controls/BalanceSummary.qml b/electrum/gui/qml/components/controls/BalanceSummary.qml index e79631e66..7ded4952f 100644 --- a/electrum/gui/qml/components/controls/BalanceSummary.qml +++ b/electrum/gui/qml/components/controls/BalanceSummary.qml @@ -150,7 +150,7 @@ Item { MouseArea { anchors.fill: parent onClicked: { - root.state = root.state == 'fiat' ? 'btc' : 'fiat' + root.state = root.state == 'fiat' && Daemon.currentWallet.isLightning ? 'btc' : 'fiat' } } @@ -164,7 +164,11 @@ Item { Connections { target: Daemon - function onWalletLoaded() { setBalances() } + function onWalletLoaded() { + setBalances() + if (!Daemon.currentWallet.isLightning) + root.state = 'fiat' + } } Connections {