feat: in offline mode navigate creator to sign screen after creation when creator is first signer #105

Merged
s merged 2 commits from issue-103 into staging 2024-06-03 09:03:48 +00:00
Showing only changes of commit e7a004d0e7 - Show all commits

View File

@ -130,8 +130,10 @@ export const CreatePage = () => {
}) })
} }
if (userInput.startsWith('npub')) { const input = userInput.toLowerCase()
const pubkey = npubToHex(userInput)
if (input.startsWith('npub')) {
const pubkey = npubToHex(input)
if (pubkey) { if (pubkey) {
addUser(pubkey) addUser(pubkey)
setUserInput('') setUserInput('')
@ -141,12 +143,12 @@ export const CreatePage = () => {
return return
} }
if (userInput.includes('@')) { if (input.includes('@')) {
setIsLoading(true) setIsLoading(true)
setLoadingSpinnerDesc('Querying for nip05') setLoadingSpinnerDesc('Querying for nip05')
const nip05Profile = await queryNip05(userInput) const nip05Profile = await queryNip05(input)
.catch((err) => { .catch((err) => {
console.error(`error occurred in querying nip05: ${userInput}`, err) console.error(`error occurred in querying nip05: ${input}`, err)
return null return null
}) })
.finally(() => { .finally(() => {