fix(@wallet): toggle network

fixes #12247
This commit is contained in:
Anthony Laibe 2023-09-26 12:40:37 +02:00
parent 29629a3d6d
commit 4767c705df
1 changed files with 3 additions and 4 deletions

View File

@ -93,15 +93,14 @@ Item {
asset.bgColor: Theme.palette.warningColor3 asset.bgColor: Theme.palette.warningColor3
title: qsTr("Testnet mode") title: qsTr("Testnet mode")
subTitle: qsTr("Switch entire Status app to testnet only mode") subTitle: qsTr("Switch entire Status app to testnet only mode")
onClicked: testnetSwitch.clicked() onClicked: testnetSwitch.onToggled()
components: [ components: [
StatusSwitch { StatusSwitch {
id: testnetSwitch id: testnetSwitch
objectName: "testnetModeSwitch" objectName: "testnetModeSwitch"
checked: walletStore.areTestNetworksEnabled checked: walletStore.areTestNetworksEnabled
checkable: false onToggled: {
onClicked: { checked = Qt.binding(() => walletStore.areTestNetworksEnabled)
checkable = false
Global.openTestnetPopup() Global.openTestnetPopup()
} }
} }