parent
a530f65ada
commit
eee22f1cc8
|
@ -183,7 +183,7 @@ Item {
|
||||||
contactsContainer.isPending = false
|
contactsContainer.isPending = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
searchResults.username = utilsModel.generateAlias(resolvedPubKey)
|
searchResults.username = Utils.isChatKey(addContactSearchInput.text) ? utilsModel.generateAlias(resolvedPubKey) : Utils.addStatusEns(addContactSearchInput.text.trim())
|
||||||
searchResults.userAlias = Utils.compactAddress(resolvedPubKey, 4)
|
searchResults.userAlias = Utils.compactAddress(resolvedPubKey, 4)
|
||||||
searchResults.pubKey = resolvedPubKey
|
searchResults.pubKey = resolvedPubKey
|
||||||
searchResults.showProfileNotFoundMessage = false
|
searchResults.showProfileNotFoundMessage = false
|
||||||
|
|
|
@ -190,6 +190,10 @@ QtObject {
|
||||||
return userName.endsWith(".stateofus.eth") ? userName.substr(0, userName.length - 14) : 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) {
|
function isValidAddress(inputValue) {
|
||||||
return inputValue !== "0x" && /^0x[a-fA-F0-9]{40}$/.test(inputValue)
|
return inputValue !== "0x" && /^0x[a-fA-F0-9]{40}$/.test(inputValue)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue