1
0

qml: fix check when swap enabled

This commit is contained in:
Sander van Grieken
2024-11-15 02:14:16 +01:00
parent 2d86a6177e
commit fec2768692

View File

@@ -125,7 +125,8 @@ Pane {
Layout.fillWidth: true
Layout.preferredWidth: 1
text: qsTr('Swap');
enabled: Daemon.currentWallet.lightningCanSend.satsInt > 0 || Daemon.currentWallet.lightningCanReceive.satInt > 0
enabled: Daemon.currentWallet.lightningCanSend.satsInt > 0 ||
(Daemon.currentWallet.lightningCanReceive.satsInt > 0 && Daemon.currentWallet.confirmedBalance.satsInt > 0)
icon.source: Qt.resolvedUrl('../../icons/update.png')
onClicked: app.startSwap()
}