From 4625fa1d70f213c38bac438719c8c1bd757dabf9 Mon Sep 17 00:00:00 2001 From: poka Date: Tue, 7 Jun 2022 19:15:11 +0200 Subject: [PATCH] fix the fix --- lib/providers/generate_wallets.dart | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/providers/generate_wallets.dart b/lib/providers/generate_wallets.dart index 9e4ec10..2a0f57f 100644 --- a/lib/providers/generate_wallets.dart +++ b/lib/providers/generate_wallets.dart @@ -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;