diff --git a/src/pages/create/index.tsx b/src/pages/create/index.tsx index 54addd2..f7a11ee 100644 --- a/src/pages/create/index.tsx +++ b/src/pages/create/index.tsx @@ -130,8 +130,10 @@ export const CreatePage = () => { }) } - if (userInput.startsWith('npub')) { - const pubkey = npubToHex(userInput) + const input = userInput.toLowerCase() + + if (input.startsWith('npub')) { + const pubkey = npubToHex(input) if (pubkey) { addUser(pubkey) setUserInput('') @@ -141,12 +143,12 @@ export const CreatePage = () => { return } - if (userInput.includes('@')) { + if (input.includes('@')) { setIsLoading(true) setLoadingSpinnerDesc('Querying for nip05') - const nip05Profile = await queryNip05(userInput) + const nip05Profile = await queryNip05(input) .catch((err) => { - console.error(`error occurred in querying nip05: ${userInput}`, err) + console.error(`error occurred in querying nip05: ${input}`, err) return null }) .finally(() => {