fix(@wallet): Hide ens settings section if no wallet

This commit is contained in:
Anthony Laibe 2022-04-21 12:50:01 +02:00 committed by Anthony Laibe
parent 5e05a7613c
commit 6d1e0f8cc3
2 changed files with 4 additions and 17 deletions

View File

@ -30,6 +30,9 @@ Column {
icon.name: model.icon
selected: Global.settingsSubsection === model.subsection
onClicked: root.menuItemClicked(model)
visible: {
(model.subsection !== Constants.settingsSubsection.ensUsernames || root.walletMenuItemEnabled)
}
}
}

View File

@ -393,22 +393,6 @@ Item {
//% "Register"
qsTrId("ens-register")
enabled: parseFloat(root.ensUsernamesStore.getSntBalance()) >= 10 && termsAndConditionsCheckbox.checked
onClicked: localAccountSensitiveSettings.isWalletEnabled ? transactionDialog.open() : confirmationPopup.open()
}
ConfirmationDialog {
id: confirmationPopup
showCancelButton: true
confirmationText: qsTr("This feature is experimental and is meant for testing purposes by core contributors and the community. It's not meant for real use and makes no claims of security or integrity of funds or data. Use at your own risk.")
confirmButtonLabel: qsTr("I understand")
onConfirmButtonClicked: {
localAccountSensitiveSettings.isWalletEnabled = true
close()
transactionDialog.open()
}
onCancelButtonClicked: {
close()
}
onClicked: transactionDialog.open()
}
}