fix: Mnemonic login
This commit is contained in:
parent
28dec3aa0e
commit
e6daf6536e
@ -98,7 +98,7 @@ export const EmailRegex =
|
||||
/**
|
||||
* Regex to match a mnemonic seed
|
||||
*/
|
||||
export const MnemonicRegex = /^([^\s]+\s){11}[^\s]+$/;
|
||||
export const MnemonicRegex = /(\w+)/g;
|
||||
|
||||
/**
|
||||
* Extract file extensions regex
|
||||
|
@ -32,7 +32,7 @@ export default function useLoginHandler() {
|
||||
} else if (key.match(EmailRegex)) {
|
||||
const hexKey = await getNip05PubKey(key);
|
||||
LoginStore.loginWithPubkey(hexKey);
|
||||
} else if (key.match(MnemonicRegex)) {
|
||||
} else if (key.match(MnemonicRegex)?.length === 24) {
|
||||
if (!hasSubtleCrypto) {
|
||||
throw new Error(insecureMsg);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user