fix error on login
This commit is contained in:
@@ -64,13 +64,14 @@ export const ModalLogin = () => {
|
||||
const pubkey = getNpub.names[username]
|
||||
const npub = nip19.npubEncode(pubkey)
|
||||
const passphrase = values.password
|
||||
|
||||
console.log('fetch', npub, passphrase)
|
||||
const k: any = await swicCall('fetchKey', npub, passphrase)
|
||||
notify(`Fetched ${k.npub}`, 'success')
|
||||
cleanUpStates()
|
||||
navigate(`/key/${k.npub}`)
|
||||
} catch (error: any) {
|
||||
notify(error.message, 'error')
|
||||
notify(error?.message || 'Something went wrong!', 'error')
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -12,7 +12,7 @@ export const schema = yup.object().shape({
|
||||
return USERNAME_WITH_DOMAIN_REGEXP.test(value)
|
||||
})
|
||||
.required(),
|
||||
password: yup.string().required(),
|
||||
password: yup.string().required().min(4),
|
||||
})
|
||||
|
||||
export type FormInputType = yup.InferType<typeof schema>
|
||||
|
Reference in New Issue
Block a user