Skip to content

Commit

Permalink
fix: Password screen disappears (closes #9)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCyjaneK committed Nov 19, 2024
1 parent 85263a9 commit ac7133a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/view_model/create_wallet_view_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,8 @@ class PinFormElement extends FormElement {
Future<void> Function(BuildContext context)? onChanged;
Future<void> Function(BuildContext context)? onConfirm;
Future<void> onConfirmInternal(BuildContext context) async {
isConfirmed = true;
await valueOutcome.encode(ctrl.text);
isConfirmed = true;
}

bool isConfirmed = false;
Expand Down
4 changes: 4 additions & 0 deletions lib/view_model/open_wallet_view_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ class OpenWalletViewModel extends ViewModel {
}

Future<bool> checkWalletPassword() async {
try {
return coinInfo.checkWalletPassword(await walletPassword.value);
} catch (e) {
return false;
}
}

Future<void> openWalletIfPasswordCorrect(BuildContext context) async {
Expand Down
7 changes: 5 additions & 2 deletions lib/view_model/security_backup_view_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ class SecurityBackupViewModel extends ViewModel {
},
showNumboard: true,
onConfirm: (BuildContext context) async {
await form.first.value;

try {
await form.first.value;
} catch (e) {
print(e);
}
isLocked = false;
markNeedsBuild();
})
Expand Down

0 comments on commit ac7133a

Please sign in to comment.