diff --git a/src/app/global/user_profile.nim b/src/app/global/user_profile.nim index bd3aa873a1..2d81c03a20 100644 --- a/src/app/global/user_profile.nim +++ b/src/app/global/user_profile.nim @@ -84,13 +84,6 @@ QtObject: read = getEnsName notify = nameChanged - proc getPrettyEnsName*(self: UserProfile): string {.slot.} = - utils.prettyEnsName(self.ensName) - QtProperty[string] prettyEnsName: - read = getPrettyEnsName - notify = nameChanged - - # this is not a slot proc setFirstEnsName*(self: UserProfile, name: string) = if(self.firstEnsName == name): @@ -105,7 +98,7 @@ QtObject: notify = nameChanged proc getPrettyFirstEnsName*(self: UserProfile): string {.slot.} = - utils.prettyEnsName(self.firstEnsName) + self.firstEnsName QtProperty[string] prettyFirstEnsName: read = getPrettyFirstEnsName notify = nameChanged @@ -125,7 +118,7 @@ QtObject: notify = nameChanged proc getPrettyPreferredName*(self: UserProfile): string {.slot.} = - utils.prettyEnsName(self.preferredName) + self.preferredName QtProperty[string] prettyPreferredName: read = getPrettyPreferredName notify = nameChanged @@ -149,7 +142,7 @@ QtObject: elif(self.firstEnsName.len > 0): return self.getPrettyFirstEnsName() elif(self.ensName.len > 0): - return self.getPrettyEnsName() + return self.ensName elif(self.displayName.len > 0): return self.getDisplayName() return self.username diff --git a/src/app_service/common/utils.nim b/src/app_service/common/utils.nim index b8bf480c0e..4ae9bbacef 100644 --- a/src/app_service/common/utils.nim +++ b/src/app_service/common/utils.nim @@ -27,13 +27,6 @@ proc first*(jArray: JsonNode, fieldName, id: string): JsonNode = if child{fieldName}.getStr.toLower == id.toLower: return child -proc prettyEnsName*(ensName: string): string = - if ensName.endsWith(STATUS_DOMAIN): - return "@" & ensName.split(".")[0] - elif ensName.endsWith(ETH_DOMAIN): - return "@" & ensName - return ensName - const sep = when defined(windows): "\\" else: "/" proc defaultDataDir(): string = diff --git a/src/app_service/service/contacts/dto/contacts.nim b/src/app_service/service/contacts/dto/contacts.nim index 29554e7438..542756eba0 100644 --- a/src/app_service/service/contacts/dto/contacts.nim +++ b/src/app_service/service/contacts/dto/contacts.nim @@ -151,7 +151,7 @@ proc toContactsDto*(jsonObj: JsonNode): ContactsDto = proc userExtractedName(contact: ContactsDto): string = if(contact.name.len > 0 and contact.ensVerified): - result = prettyEnsName(contact.name) + result = contact.name elif contact.displayName.len > 0: result = contact.displayName else: @@ -205,4 +205,4 @@ proc isContactUntrustworthy*(self: ContactsDto): bool = return self.trustStatus == TrustStatus.Untrustworthy proc isContactMarked*(self: ContactsDto): bool = - return self.isContactVerified() or self.isContactUntrustworthy() \ No newline at end of file + return self.isContactVerified() or self.isContactUntrustworthy() diff --git a/storybook/pages/CommunityProfilePopupInviteFriendsPanelPage.qml b/storybook/pages/CommunityProfilePopupInviteFriendsPanelPage.qml index 6f73e09bd4..0360a02efc 100644 --- a/storybook/pages/CommunityProfilePopupInviteFriendsPanelPage.qml +++ b/storybook/pages/CommunityProfilePopupInviteFriendsPanelPage.qml @@ -9,10 +9,12 @@ Item { property bool mainModuleReady: false QtObject { - function getCompressedPk(publicKey) { - return "compressed" + function isCompressedPubKey(publicKey) { + return true } + function getCompressedPk(publicKey) { return "zx3sh" + publicKey } + function getColorHashAsJson(publicKey) { return JSON.stringify([{colorId: 0, segmentLength: 1}, {colorId: 19, segmentLength: 2}]) diff --git a/storybook/pages/ProfileDialogViewPage.qml b/storybook/pages/ProfileDialogViewPage.qml index f2f568733f..1687299b37 100644 --- a/storybook/pages/ProfileDialogViewPage.qml +++ b/storybook/pages/ProfileDialogViewPage.qml @@ -22,7 +22,12 @@ SplitView { function getCompressedPk(publicKey) { return "zx3sh" + publicKey } - function getColorHashAsJson(publicKey) { return JSON.stringify("") } // TODO + function getColorHashAsJson(publicKey) { + return JSON.stringify([{colorId: 0, segmentLength: 1}, + {colorId: 19, segmentLength: 2}]) + } + + function isCompressedPubKey(publicKey) { return true } Component.onCompleted: { Utils.globalUtilsInst = this diff --git a/ui/StatusQ/src/StatusQ/Components/StatusMemberListItem.qml b/ui/StatusQ/src/StatusQ/Components/StatusMemberListItem.qml index 1f14507d34..90649e7704 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusMemberListItem.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusMemberListItem.qml @@ -1,4 +1,5 @@ -import QtQuick 2.0 +import QtQuick 2.14 + import StatusQ.Core.Theme 0.1 import StatusQ.Core 0.1 diff --git a/ui/app/AppLayouts/Chat/panels/ContactListPanel.qml b/ui/app/AppLayouts/Chat/panels/ContactListPanel.qml deleted file mode 100644 index 1941370939..0000000000 --- a/ui/app/AppLayouts/Chat/panels/ContactListPanel.qml +++ /dev/null @@ -1,75 +0,0 @@ -import QtQuick 2.13 -import QtQuick.Controls 2.3 - -import StatusQ.Core 0.1 -import StatusQ.Components 0.1 -import StatusQ.Controls 0.1 -import StatusQ.Core.Theme 0.1 - -import utils 1.0 - -StatusListView { - id: contactListPanel - - property string searchString - property bool selectMode: true - property var onItemChecked - - property var selectedPubKeys: [] - - spacing: 0 - - ScrollBar.horizontal.policy: ScrollBar.AlwaysOff - - delegate: StatusListItem { - id: contactDelegate - - property bool isChecked: selectedPubKeys.indexOf(model.pubKey) !== -1 - - visible: { - if (selectMode) { - return !searchString || model.displayName.toLowerCase().includes(searchString) - } - return checkbox.checked - } - - title: !model.displayName.endsWith(".eth") && !!model.localNickname ? - model.localNickname : Utils.removeStatusEns(model.displayName) - asset.height: asset.isImage ? 40 : 20 - asset.width: asset.isImage ? 40 : 20 - asset.name: model.icon - asset.isImage: model.icon !== "" - asset.color: Utils.colorForColorId(model.colorId) - asset.charactersLen: 2 - ringSettings.ringSpecModel: Utils.getColorHashAsJson(model.pubKey) - - height: visible ? implicitHeight : 0 - - function contactToggled(pubKey) { - if (contactListPanel.selectMode) { - let pubkeys = contactListPanel.selectedPubKeys - let idx = pubkeys.indexOf(pubKey) - if (idx === -1) { - pubkeys.push(pubKey) - } else if (idx > -1) { - pubkeys.splice(idx, 1); - } - contactListPanel.selectedPubKeys = pubkeys - } - } - - components: [ - StatusCheckBox { - id: checkbox - visible: contactListPanel.selectMode - checked: selectedPubKeys.indexOf(model.pubKey) !== -1 - onClicked: { - contactDelegate.contactToggled(model.pubKey) - } - } - ] - onClicked: { - contactDelegate.contactToggled(model.pubKey) - } - } -} diff --git a/ui/app/AppLayouts/Chat/panels/UserListPanel.qml b/ui/app/AppLayouts/Chat/panels/UserListPanel.qml index 99148db8d5..63f080ad2e 100644 --- a/ui/app/AppLayouts/Chat/panels/UserListPanel.qml +++ b/ui/app/AppLayouts/Chat/panels/UserListPanel.qml @@ -79,10 +79,11 @@ Item { section.property: "onlineStatus" section.delegate: (root.width > 58) ? sectionDelegateComponent : null delegate: StatusMemberListItem { + readonly property bool ensVerified: Utils.isEnsVerified(model.pubKey) width: ListView.view.width nickName: model.localNickname - userName: !!model.ensName ? "@" + Utils.removeStatusEns(model.ensName) : model.displayName !== "" ? model.displayName : model.alias - pubKey: !!model.ensName ? "" : Utils.getCompressedPk(model.pubKey) + userName: ensVerified ? model.ensName : model.displayName !== "" ? model.displayName : model.alias + pubKey: ensVerified ? "" : Utils.getCompressedPk(model.pubKey) isContact: model.isContact isVerified: model.isVerified isUntrustworthy: model.isUntrustworthy @@ -92,7 +93,7 @@ Item { asset.isLetterIdenticon: (asset.name === "") asset.color: Utils.colorForColorId(model.colorId) status: model.onlineStatus - ringSettings.ringSpecModel: !!model.ensName ? undefined : Utils.getColorHashAsJson(model.pubKey, true) // FIXME: use model.colorHash + ringSettings.ringSpecModel: ensVerified ? undefined : Utils.getColorHashAsJson(model.pubKey, true) // FIXME: use model.colorHash onClicked: { if (mouse.button === Qt.RightButton) { // Set parent, X & Y positions for the messageContextMenu diff --git a/ui/app/AppLayouts/Chat/popups/PrivateChatPopup.qml b/ui/app/AppLayouts/Chat/popups/PrivateChatPopup.qml deleted file mode 100644 index 68b5f0046f..0000000000 --- a/ui/app/AppLayouts/Chat/popups/PrivateChatPopup.qml +++ /dev/null @@ -1,100 +0,0 @@ -import QtQuick 2.13 -import QtQuick.Controls 2.13 -import QtQuick.Layouts 1.13 - -import utils 1.0 -import shared.controls 1.0 -import shared 1.0 -import shared.panels 1.0 -import shared.popups 1.0 -import shared.status 1.0 -import "./" - -// TODO: replace with StatusModal -ModalPopup { - id: popup - title: qsTr("New chat") - property var store - property var contactsStore - - signal joinPrivateChat(string publicKey, string ensName) - - signal profileClicked() - function doJoin(pubKey, username) { - popup.joinPrivateChat(pubKey, Utils.isChatKey(pubKey) ? "" : username); - popup.close(); - } - - onOpened: { - contactFieldAndList.chatKey.text = "" - contactFieldAndList.pubKey = "" - contactFieldAndList.ensUsername = "" - contactFieldAndList.chatKey.forceActiveFocus(Qt.MouseFocusReason) - contactFieldAndList.existingContacts.visible = contactsStore.myContactsModel.count > 0 - contactFieldAndList.noContactsRect.visible = !contactFieldAndList.existingContacts.visible - } - - ContactsListAndSearch { - id: contactFieldAndList - anchors.top: parent.top - anchors.bottom: parent.bottom - width: parent.width - addContactEnabled: false - - contactsStore: popup.contactsStore - rootStore: popup.store - - onUserClicked: function (pubKey, isAddedContact, username) { - popup.doJoin(pubKey, username); - } - } - - Control { - width: 124 - height: 36 - anchors.bottom: parent.bottom - anchors.bottomMargin: 24 - anchors.horizontalCenter: parent.horizontalCenter - background: Rectangle { - anchors.fill: parent - radius: 34 - color: Style.current.blue - } - contentItem: Item { - anchors.fill: parent - RoundedImage { - id: dollarEmoji - width: 32 - height: 32 - anchors.left: parent.left - anchors.leftMargin: 2 - anchors.verticalCenter: parent.verticalCenter - source: Global.getProfileImage(userProfile.pubKey) - } - - StyledText { - anchors.left: dollarEmoji.right - anchors.leftMargin: 6 - anchors.verticalCenter: parent.verticalCenter - text: qsTr("My Profile") - font.pixelSize: 15 - color: Style.current.white - } - } - MouseArea { - anchors.fill: parent - cursorShape: "PointingHandCursor" - onClicked: { - popup.profileClicked(); - Global.settingsSubsection = Constants.settingsSubsection.profile; - popup.close(); - } - } - } -} - -/*##^## -Designer { - D{i:0;height:300;width:300} -} -##^##*/ diff --git a/ui/app/AppLayouts/Chat/views/ChatView.qml b/ui/app/AppLayouts/Chat/views/ChatView.qml index b4b87840bb..9ac02fa292 100644 --- a/ui/app/AppLayouts/Chat/views/ChatView.qml +++ b/ui/app/AppLayouts/Chat/views/ChatView.qml @@ -185,8 +185,4 @@ StatusSectionLayout { root.rootStore.chatCommunitySectionModule.createOneToOneChat(communityId, chatId, ensName) } } - - Component.onCompleted: { - rootStore.groupInfoPopupComponent = groupInfoPopupComponent; - } } diff --git a/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml b/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml index 0ffba76612..e9d1e394b9 100644 --- a/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml +++ b/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml @@ -270,23 +270,6 @@ Item { } } - Component { - id: privateChatPopupComponent - PrivateChatPopup { - store: root.store - contactsStore: root.contactsStore - onJoinPrivateChat: { - chatSectionModule.createOneToOneChat("", publicKey, ensName) - } - onClosed: { - destroy() - } - onProfileClicked: { - root.openProfileClicked(); - } - } - } - Component { id: communitiesPopupComponent CommunitiesPopup { diff --git a/ui/app/AppLayouts/Profile/panels/ContactPanel.qml b/ui/app/AppLayouts/Profile/panels/ContactPanel.qml index fb7fe4e93d..7a268c7d94 100644 --- a/ui/app/AppLayouts/Profile/panels/ContactPanel.qml +++ b/ui/app/AppLayouts/Profile/panels/ContactPanel.qml @@ -55,7 +55,7 @@ StatusListItem { subTitle: { if (d.ensVerified) { if (d.localNickname) - return '@' + Utils.removeStatusEns(d.name) + return d.name return "" } return Utils.getElidedCompressedPk(root.publicKey) diff --git a/ui/app/AppLayouts/Profile/views/AppearanceView.qml b/ui/app/AppLayouts/Profile/views/AppearanceView.qml index 2b2ebc186d..b2ec70da30 100644 --- a/ui/app/AppLayouts/Profile/views/AppearanceView.qml +++ b/ui/app/AppLayouts/Profile/views/AppearanceView.qml @@ -73,7 +73,7 @@ SettingsContentBase { isMessage: true shouldRepeatHeader: true messageTimestamp: Date.now() - senderDisplayName: "@vitalik" + senderDisplayName: "vitalik.eth" senderIcon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAb0lEQVR4Ae3UQQqAIBRF0Wj9ba9Bq6l5JBQqfn/ngDMH3YS3AAB/tO3H+XRG3b9bR/+gVoREI2RapVXpfd5+X5oXERKNkHS+rk3tOpWkeREh0QiZVu91ql2zNC8iJBoh0yqtSqt1slpCghICANDPBc0ESPh0bHkHAAAAAElFTkSuQmCC" messageText: qsTr("Blockchains will drop search costs, causing a kind of decomposition that allows you to have markets of entities that are horizontally segregated and vertically segregated.") messageContentType: Constants.messageContentType.messageType diff --git a/ui/app/AppLayouts/stores/MessageStore.qml b/ui/app/AppLayouts/stores/MessageStore.qml deleted file mode 100644 index d963b999ae..0000000000 --- a/ui/app/AppLayouts/stores/MessageStore.qml +++ /dev/null @@ -1,133 +0,0 @@ -import QtQuick 2.13 -import utils 1.0 - -QtObject { - id: root - property string hoveredMessage - property string activeMessage - property string fromAuthor: "0x0011223344556677889910" - property string userName: "Jotaro Kujo" - property string alias: "" - property string localName: "" - property string message: "That's right. We're friends... Of justice, that is." - property string plainText: "That's right. We're friends... Of justice, that is." - property bool isCurrentUser: false - property string timestamp: "1234567" - property string sticker: "Qme8vJtyrEHxABcSVGPF95PtozDgUyfr1xGjePmFdZgk9v" - property int contentType: 1 // constants don't work in default props - property string chatId: "chatId" - property string outgoingStatus: "" - property string responseTo: "" - property string messageId: "" - property string emojiReactions: "" - property int prevMessageIndex: -1 - property int nextMessageIndex: -1 - property bool timeout: false - property bool hasMention: false - property string linkUrls: "" - property bool placeholderMessage: false - property bool activityCenterMessage: false - property bool pinnedMessage: false - property bool read: true - property string pinnedBy - property bool forceHoverHandler: false // Used to force the HoverHandler to be active (useful for messages in popups) - property string communityId: "" - property int stickerPackId: -1 - property int gapFrom: 0 - property int gapTo: 0 - property bool isEdit: false - property string replaces: "" - property bool isEdited: false - property bool showEdit: true - property var messageContextMenu - property bool isMessageActive: typeof root.activeMessage !== "undefined" && root.activeMessage === root.messageId - property string displayUserName: { - if (isCurrentUser) { - return qsTr("You") - } - - if (localName !== "") { - return localName - } - - if (userName !== "") { - return Utils.removeStatusEns(userName) - } - return Utils.removeStatusEns(alias) - } - - property string authorCurrentMsg: "authorCurrentMsg" - property string authorPrevMsg: "authorPrevMsg" - - property string prevMsgTimestamp: chatsModel.messageView.messageList.getMessageData(prevMessageIndex, "timestamp") - property string nextMsgTimestamp: chatsModel.messageView.messageList.getMessageData(nextMessageIndex, "timestamp") - - property bool shouldRepeatHeader: ((parseInt(timestamp, 10) - parseInt(prevMsgTimestamp, 10)) / 60 / 1000) > Constants.repeatHeaderInterval - - property bool isEmoji: contentType === Constants.emojiType - property bool isImage: contentType === Constants.imageType - property bool isAudio: contentType === Constants.audioType - property bool isStatusMessage: contentType === Constants.systemMessagePrivateGroupType - property bool isSticker: contentType === Constants.stickerType - property bool isText: contentType === Constants.messageType || contentType === Constants.editType - property bool isMessage: isEmoji || isImage || isSticker || isText || isAudio - || contentType === Constants.communityInviteType || contentType === Constants.transactionType - - property bool isExpired: (outgoingStatus === "sending" && (Math.floor(timestamp) + 180000) < Date.now()) - property int statusAgeEpoch: 0 - -// property int replyMessageIndex: chatsModel.messageView.messageList.getMessageIndex(responseTo); -// property string repliedMessageAuthor: replyMessageIndex > -1 ? chatsModel.messageView.messageList.getMessageData(replyMessageIndex, "userName") : ""; -// property string repliedMessageAuthorPubkey: replyMessageIndex > -1 ? chatsModel.messageView.messageList.getMessageData(replyMessageIndex, "publicKey") : ""; -// property bool repliedMessageAuthorIsCurrentUser: replyMessageIndex > -1 ? repliedMessageAuthorPubkey === userProfile.pubKey : ""; -// property bool repliedMessageIsEdited: replyMessageIndex > -1 ? chatsModel.messageView.messageList.getMessageData(replyMessageIndex, "isEdited") === "true" : false; -// property string repliedMessageContent: replyMessageIndex > -1 ? chatsModel.messageView.messageList.getMessageData(replyMessageIndex, "message") : ""; -// property int repliedMessageType: replyMessageIndex > -1 ? parseInt(chatsModel.messageView.messageList.getMessageData(replyMessageIndex, "contentType")) : 0; -// property string repliedMessageImage: replyMessageIndex > -1 ? chatsModel.messageView.messageList.getMessageData(replyMessageIndex, "image") : ""; -// property string repliedMessageUserIdenticon: replyMessageIndex > -1 ? chatsModel.messageView.messageList.getMessageData(replyMessageIndex, "identicon") : ""; -// property string repliedMessageUserImage: replyMessageIndex > -1 ? appMain.getProfileImage(repliedMessageAuthorPubkey, repliedMessageAuthorIsCurrentUser , false) || "" : ""; - - property var imageClick: function () {} - property var scrollToBottom: function () {} - property string userPubKey: { - if (contentType === Constants.chatIdentifier) { - return chatId - } - return fromAuthor - } - property bool useLargeImage: contentType === Constants.chatIdentifier - - property string profileImageSource: !placeholderMessage && appMain.getProfileImage(userPubKey, isCurrentUser, useLargeImage) || "" - - property var emojiReactionsModel: { - if (!emojiReactions) { - return [] - } - - try { - // group by id - var allReactions = Object.values(JSON.parse(emojiReactions)) - var byEmoji = {} - allReactions.forEach(function (reaction) { - if (!byEmoji[reaction.emojiId]) { - byEmoji[reaction.emojiId] = { - emojiId: reaction.emojiId, - fromAccounts: [], - count: 0, - currentUserReacted: false - } - } - byEmoji[reaction.emojiId].count++; - byEmoji[reaction.emojiId].fromAccounts.push(chatsModel.userNameOrAlias(reaction.from)); - if (!byEmoji[reaction.emojiId].currentUserReacted && reaction.from === userProfile.pubKey) { - byEmoji[reaction.emojiId].currentUserReacted = true - } - - }) - return Object.values(byEmoji) - } catch (e) { - console.error('Error parsing emoji reactions', e) - return [] - } - } -} diff --git a/ui/app/mainui/activitycenter/controls/ChannelBadge.qml b/ui/app/mainui/activitycenter/controls/ChannelBadge.qml index 66cc2a8a15..78d0532b93 100644 --- a/ui/app/mainui/activitycenter/controls/ChannelBadge.qml +++ b/ui/app/mainui/activitycenter/controls/ChannelBadge.qml @@ -61,7 +61,7 @@ Badge { StyledText { Layout.alignment: Qt.AlignVCenter text: chatType !== Constants.chatType.publicChat ? - StatusQUtils.Emoji.parse(Utils.removeStatusEns(StatusQUtils.Utils.filterXSS(name))) : + StatusQUtils.Emoji.parse(StatusQUtils.Utils.filterXSS(name)) : "#" + StatusQUtils.Utils.filterXSS(name) color: Theme.palette.baseColor1 diff --git a/ui/imports/shared/controls/ContactsListAndSearch.qml b/ui/imports/shared/controls/ContactsListAndSearch.qml index 3f78ec4c56..4c984fb19e 100644 --- a/ui/imports/shared/controls/ContactsListAndSearch.qml +++ b/ui/imports/shared/controls/ContactsListAndSearch.qml @@ -129,7 +129,7 @@ Item { root.validationError = qsTr("Can't chat with yourself"); } else { chatKey.hasValidSearchResult = true - searchResults.username = Utils.addStatusEns(chatKey.text.trim()) + searchResults.username = chatKey.text.trim() let userAlias = globalUtils.generateAlias(resolvedPubKey) userAlias = userAlias.length > 20 ? userAlias.substring(0, 19) + "..." : userAlias searchResults.userAlias = userAlias + " • " + Utils.compactAddress(resolvedPubKey, 4) diff --git a/ui/imports/shared/views/ProfileDialogView.qml b/ui/imports/shared/views/ProfileDialogView.qml index 3d05259639..49a3b5344d 100644 --- a/ui/imports/shared/views/ProfileDialogView.qml +++ b/ui/imports/shared/views/ProfileDialogView.qml @@ -47,7 +47,7 @@ Pane { readonly property bool isCurrentUser: root.profileStore.pubkey === root.publicKey readonly property string userDisplayName: contactDetails.displayName readonly property string userNickName: contactDetails.localNickname - readonly property string prettyEnsName: '@' + Utils.removeStatusEns(contactDetails.name) + readonly property string prettyEnsName: contactDetails.name readonly property bool isContact: contactDetails.isContact readonly property bool isBlocked: contactDetails.isBlocked diff --git a/ui/imports/shared/views/TransactionPreview.qml b/ui/imports/shared/views/TransactionPreview.qml index 4e95e88d93..07721a4985 100644 --- a/ui/imports/shared/views/TransactionPreview.qml +++ b/ui/imports/shared/views/TransactionPreview.qml @@ -165,7 +165,7 @@ Item { } PropertyChanges { target: txtToPrimary - text: Utils.removeStatusEns(root.toAccount.name) + text: root.toAccount.name } }, State { diff --git a/ui/imports/utils/Utils.qml b/ui/imports/utils/Utils.qml index d1bc1f02a2..668759c305 100644 --- a/ui/imports/utils/Utils.qml +++ b/ui/imports/utils/Utils.qml @@ -109,14 +109,6 @@ QtObject { return emoji_regex.test(inputText); } - function removeStatusEns(userName){ - return userName.endsWith(".stateofus.eth") ? userName.substr(0, userName.length - 14) : userName - } - - function addStatusEns(userName){ - return userName.endsWith(".eth") ? userName : userName + ".stateofus.eth" - } - function isValidAddress(inputValue) { return inputValue !== "0x" && /^0x[a-fA-F0-9]{40}$/.test(inputValue) }