From 393ee8e284973af65bc9574895c44e09a33bfbdc Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Wed, 3 Jul 2024 14:06:03 -0400 Subject: [PATCH] fix(profile): fix missing ring in own profile (#15366) Fixes #15314 The problem is that we used the `name` property to know if we have an ENS name, but we actually set it to whatever is available, so we need to validate that it's an ENS name --- storybook/qmlTests/tests/tst_ContactDetails.qml | 2 +- ui/app/AppLayouts/Profile/helpers/ContactDetails.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/storybook/qmlTests/tests/tst_ContactDetails.qml b/storybook/qmlTests/tests/tst_ContactDetails.qml index 72ab08d254..206a13a046 100644 --- a/storybook/qmlTests/tests/tst_ContactDetails.qml +++ b/storybook/qmlTests/tests/tst_ContactDetails.qml @@ -108,7 +108,7 @@ Item { compare(contactDetails.profileStore.displayName,"myDisplayName", "Expected the profile store to be set") compare(contactDetails.displayName, contactDetails.profileStore.displayName, "Expected the display name to be set") compare(contactDetails.ensName, contactDetails.profileStore.name, "Expected the ens name to be set") - compare(contactDetails.ensVerified, true, "Expected the ensVerified to be set") + compare(contactDetails.ensVerified, false, "Expected the ensVerified to be set") compare(contactDetails.localNickname, "", "Expected the local nickname to be empty") compare(contactDetails.alias, contactDetails.profileStore.username, "Expected the alias to be set") compare(contactDetails.icon, contactDetails.profileStore.icon, "Expected the icon to be set") diff --git a/ui/app/AppLayouts/Profile/helpers/ContactDetails.qml b/ui/app/AppLayouts/Profile/helpers/ContactDetails.qml index 3e3a00f553..ebd1cc1524 100644 --- a/ui/app/AppLayouts/Profile/helpers/ContactDetails.qml +++ b/ui/app/AppLayouts/Profile/helpers/ContactDetails.qml @@ -78,7 +78,7 @@ QObject { readonly property var ownProfile: QObject { readonly property string displayName: root.profileStore.displayName readonly property string ensName: root.profileStore.name - readonly property bool isEnsVerified: root.profileStore.name !== "" + readonly property bool isEnsVerified: root.profileStore.name !== "" && Utils.isValidEns(root.profileStore.name) readonly property string localNickname: "" readonly property string alias: root.profileStore.username readonly property string icon: root.profileStore.icon