From d7928a6bb3b17ab855b806615706c6432a160d12 Mon Sep 17 00:00:00 2001 From: Bryant Eisenbach Date: Tue, 18 Feb 2020 21:50:04 -0700 Subject: [PATCH] refactor: Mnemonic check API changed per #89 --- eth_account/hdaccount/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth_account/hdaccount/__init__.py b/eth_account/hdaccount/__init__.py index 0487234a..6df2166b 100644 --- a/eth_account/hdaccount/__init__.py +++ b/eth_account/hdaccount/__init__.py @@ -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)