File tree 1 file changed +5
-5
lines changed
staking_deposit/key_handling/key_derivation
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -111,13 +111,13 @@ def reconstruct_mnemonic(mnemonic: str, words_path: str) -> Optional[str]:
111
111
reconstructed_mnemonic = None
112
112
for language in languages :
113
113
try :
114
- word_list = abbreviate_words (_get_word_list (language , words_path ))
115
- mnemonic_list = abbreviate_words (mnemonic .lower ().split (' ' ))
116
- if len (mnemonic_list ) not in range (12 , 25 , 3 ):
114
+ abbrev_word_list = abbreviate_words (_get_word_list (language , words_path ))
115
+ abbrev_mnemonic_list = abbreviate_words (mnemonic .lower ().split (' ' ))
116
+ if len (abbrev_mnemonic_list ) not in range (12 , 25 , 3 ):
117
117
return None
118
- word_indices = [_word_to_index (word_list , word ) for word in mnemonic_list ]
118
+ word_indices = [_word_to_index (abbrev_word_list , word ) for word in abbrev_mnemonic_list ]
119
119
mnemonic_int = _uint11_array_to_uint (word_indices )
120
- checksum_length = len (mnemonic_list ) // 3
120
+ checksum_length = len (abbrev_mnemonic_list ) // 3
121
121
checksum = mnemonic_int & 2 ** checksum_length - 1
122
122
entropy = (mnemonic_int - checksum ) >> checksum_length
123
123
entropy_bits = entropy .to_bytes (checksum_length * 4 , 'big' )
You can’t perform that action at this time.
0 commit comments