Skip to content

Commit

Permalink
removed a check that was not needed, when words are not passed manually
Browse files Browse the repository at this point in the history
  • Loading branch information
nillo authored and javadkh2 committed Nov 9, 2023
1 parent e807b6f commit f81b0a0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/libs/hd-wallet/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,7 @@ export async function kadenaGenSeedFromMnemonic(
* @throws {Error} If the generated mnemonic is invalid.
*/
export function kadenaGenMnemonic(): string {
const words = bip39.generateMnemonic(wordlist);
if (bip39.validateMnemonic(words, wordlist) === false) {
throw Error('Invalid mnemonic.');
}
return words;
return bip39.generateMnemonic(wordlist);
}

/**
Expand Down

0 comments on commit f81b0a0

Please sign in to comment.