pstream is dead; long live pstream taciturnaxolotl.github.io/pstream-ng/
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix, couldnt log in when using a custom passphrase

Pas 128c9d76 1fb86995

+9 -1
+9 -1
src/backend/accounts/crypto.ts
··· 26 26 } 27 27 28 28 export function verifyValidMnemonic(mnemonic: string) { 29 - return validateMnemonic(mnemonic, wordlist); 29 + // First try to validate as BIP39 mnemonic 30 + if (validateMnemonic(mnemonic, wordlist)) { 31 + return true; 32 + } 33 + 34 + // If not a valid BIP39 mnemonic, check if it's a valid custom passphrase 35 + const validPassphraseRegex = 36 + /^[a-zA-Z0-9\s\-_.,!?@#$%^&*()+=:;"'<>[\]{}|\\/`~]+$/; 37 + return mnemonic.length >= 8 && validPassphraseRegex.test(mnemonic); 30 38 } 31 39 32 40 export async function keysFromSeed(seed: Uint8Array): Promise<Keys> {