From f81b0a0edf0f39e68f78dde7203ac318ff87406f Mon Sep 17 00:00:00 2001 From: neel Date: Wed, 8 Nov 2023 10:46:35 +0100 Subject: [PATCH] removed a check that was not needed, when words are not passed manually --- packages/libs/hd-wallet/src/index.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/libs/hd-wallet/src/index.ts b/packages/libs/hd-wallet/src/index.ts index 4b77a5b3cb..5d332d6b2f 100644 --- a/packages/libs/hd-wallet/src/index.ts +++ b/packages/libs/hd-wallet/src/index.ts @@ -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); } /**