From 6d1e0f8cc30a152d75f6d7c5046c66a1f4943fc2 Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Thu, 21 Apr 2022 12:50:01 +0200 Subject: [PATCH] fix(@wallet): Hide ens settings section if no wallet --- ui/app/AppLayouts/Profile/panels/MenuPanel.qml | 3 +++ .../views/EnsTermsAndConditionsView.qml | 18 +----------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/ui/app/AppLayouts/Profile/panels/MenuPanel.qml b/ui/app/AppLayouts/Profile/panels/MenuPanel.qml index 3be3276de3..b848d27968 100644 --- a/ui/app/AppLayouts/Profile/panels/MenuPanel.qml +++ b/ui/app/AppLayouts/Profile/panels/MenuPanel.qml @@ -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) + } } } diff --git a/ui/app/AppLayouts/Profile/views/EnsTermsAndConditionsView.qml b/ui/app/AppLayouts/Profile/views/EnsTermsAndConditionsView.qml index 47a7db4b9c..9a69a54527 100644 --- a/ui/app/AppLayouts/Profile/views/EnsTermsAndConditionsView.qml +++ b/ui/app/AppLayouts/Profile/views/EnsTermsAndConditionsView.qml @@ -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() } }