Skip to content

Commit

Permalink
Remove second check for valid mnemonic length, since it is checked in…
Browse files Browse the repository at this point in the history
… the from short words function, which is always called prior to the old check
  • Loading branch information
cmmarslender committed Oct 27, 2023
1 parent 88773a9 commit 0e7b7ee
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions chia/util/keychain.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ def mnemonic_from_short_words(mnemonic_str: str) -> str:
def bytes_from_mnemonic(mnemonic_str: str) -> bytes:
full_mnemonic_str = mnemonic_from_short_words(mnemonic_str)
mnemonic: List[str] = full_mnemonic_str.split(" ")
if len(mnemonic) not in [12, 15, 18, 21, 24]:
raise ValueError("Invalid mnemonic length")

word_list = {word: i for i, word in enumerate(bip39_word_list().splitlines())}
bit_array = BitArray()
Expand Down

0 comments on commit 0e7b7ee

Please sign in to comment.