fix the fix

This commit is contained in:
poka 2022-06-07 19:15:11 +02:00
parent 3f75fa5c20
commit 4625fa1d70
1 changed files with 3 additions and 4 deletions

View File

@ -272,7 +272,7 @@ class GenerateWalletsProvider with ChangeNotifier {
return _wordsList;
}
bool isBipWord(String word) {
bool isBipWord(String word, [bool checkRedondance = true]) {
bool isValid = false;
notifyListeners();
@ -284,9 +284,8 @@ class GenerateWalletsProvider with ChangeNotifier {
if (bip39Words(appLang).contains(word.toLowerCase())) {
for (var bipWord in bip39Words(appLang)) {
if (bipWord.startsWith(word)) {
log.d('ploppp : ' + nbrMatch.toString());
isValid = nbrMatch == 0 ? true : false;
nbrMatch = nbrMatch + 1;
if (checkRedondance) nbrMatch = nbrMatch + 1;
}
}
}
@ -363,7 +362,7 @@ class GenerateWalletsProvider with ChangeNotifier {
cellController11
];
for (var word in sentence!.text!.split(' ')) {
bool isValid = isBipWord(word);
bool isValid = isBipWord(word, false);
if (isValid) {
cells[nbr].text = word;