Skip to content
Snippets Groups Projects
Commit 09116b95 authored by poka's avatar poka
Browse files

fix: lowercase for mnemonic words; set pin cache choice to false as default

parent 86931bab
No related branches found
No related tags found
No related merge requests found
Pipeline #15811 failed
......@@ -73,12 +73,11 @@ Future<void> main() async {
g1WalletsBox = await Hive.openBox<G1WalletsList>("g1WalletsBox");
await _homeProvider.getValidEndpoints();
// await configBox.delete('isCacheChecked');
// log.d(await configBox.get('endpoint'));
HttpOverrides.global = MyHttpOverrides();
if (kReleaseMode && enableSentry) {
// CatcherOptions debugOptions = CatcherOptions(DialogReportMode(), [
// SentryHandler(SentryClient(SentryOptions(
......
......@@ -283,7 +283,7 @@ class GenerateWalletsProvider with ChangeNotifier {
// Needed for bad encoding of UTF-8
word = word.replaceAll('é', 'é');
word = word.replaceAll('è', 'è');
return bip39Words(appLang).contains(word);
return bip39Words(appLang).contains(word.toLowerCase());
}
bool isBipWordsList(List<String> words) {
......@@ -292,7 +292,7 @@ class GenerateWalletsProvider with ChangeNotifier {
// Needed for bad encoding of UTF-8
word = word.replaceAll('é', 'é');
word = word.replaceAll('è', 'è');
if (!bip39Words(appLang).contains(word)) {
if (!bip39Words(appLang).contains(word.toLowerCase())) {
isValid = false;
}
}
......
......@@ -233,7 +233,7 @@ class WalletOptionsProvider with ChangeNotifier {
}
Future changePinCacheChoice() async {
bool isCacheChecked = configBox.get('isCacheChecked') ?? true;
bool isCacheChecked = configBox.get('isCacheChecked') ?? false;
await configBox.put('isCacheChecked', !isCacheChecked);
notifyListeners();
}
......
......@@ -180,7 +180,7 @@ class RestoreChest extends StatelessWidget {
textInputAction: TextInputAction.next,
onChanged: (v) {
bool isValid = generateWalletProvider.isBipWord(v);
if (isValid) cellCtl.text = cellCtl.text.toLowerCase();
if (isValid && generateWalletProvider.cellController11.text.isEmpty) {
FocusScope.of(context).nextFocus();
}
......
......@@ -38,7 +38,7 @@ class UnlockingWallet extends StatelessWidget {
currentChest = chestBox.get(currentChestNumber)!;
if (configBox.get('isCacheChecked') == null) {
configBox.put('isCacheChecked', true);
configBox.put('isCacheChecked', false);
}
int _pinLenght = _walletOptions.getPinLenght(wallet!.number);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment