Skip to content

Commit

Permalink
Actually shortens words for abbrviated mnemonic test vectors
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlBeek committed Mar 29, 2022
1 parent 1bc54e0 commit 3be3723
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_key_handling/test_key_derivation/test_mnemonic.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
from typing import (
Sequence,
)
from unicodedata import normalize

from staking_deposit.utils.constants import (
MNEMONIC_LANG_OPTIONS,
)
from staking_deposit.key_handling.key_derivation.mnemonic import (
_index_to_word,
_get_word_list,
abbreviate_words,
get_seed,
get_mnemonic,
reconstruct_mnemonic,
Expand Down Expand Up @@ -52,7 +52,8 @@ def test_reconstruct_mnemonic(test_mnemonic: str) -> None:

def abbreviate_mnemonic(mnemonic: str) -> str:
words = str.split(mnemonic)
words = [normalize('NFKC', word) for word in words]
words = abbreviate_words(words)
assert all([len(word) <= 4 for word in words])
return str.join(' ', words)


Expand Down

0 comments on commit 3be3723

Please sign in to comment.