Adding users - npub and search trim #321

Open
enes wants to merge 2 commits from 308-npub-search into staging
Showing only changes of commit 4b5625e5bd - Show all commits

View File

@ -1045,6 +1045,11 @@ export const CreatePage = () => {
// Seems like it's npub format
if (value.trim().startsWith('npub1')) {
setPastedUserNpubOrNip05(value.trim())
} else if (value.trim().startsWith('nsec1')) {
toast.warn('Oops - never paste your nsec into a website! Key deleted.')
if (searchFieldRef.current) searchFieldRef.current.value = ''
setUserSearchInput('')
return
} else {
// Disarm the add user on enter hit, and trigger search after 1 second
disarmAddOnEnter()