Merge pull request 'fix: convert npub/nip05 to lowercase on adding as signer/viewer' (#102) from issue-101 into staging
All checks were successful
Release to Staging / build_and_release (push) Successful in 1m8s
All checks were successful
Release to Staging / build_and_release (push) Successful in 1m8s
Reviewed-on: https://git.sigit.io/sig/it/pulls/102
This commit is contained in:
commit
2829623487
@ -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(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user