Skip to content

Commit

Permalink
refactor: Mnemonic check API changed per ethereum#89
Browse files Browse the repository at this point in the history
  • Loading branch information
fubuloubu committed Mar 19, 2020
1 parent bdf6426 commit 7ffbe47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eth_account/hdaccount/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def derive_ethereum_key(seed: bytes, account_index: int=0):
def seed_from_mnemonic(words: str, passphrase="") -> bytes:
lang = Mnemonic.detect_language(words)
expanded_words = Mnemonic(lang).expand(words)
if not Mnemonic(lang).check(expanded_words):
if not Mnemonic(lang).is_mnemonic_valid(expanded_words):
raise ValidationError("Provided words are not a valid BIP39 mnemonic phrase!")
return Mnemonic.to_seed(expanded_words, passphrase)

Expand Down

0 comments on commit 7ffbe47

Please sign in to comment.