Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions lib/app/service/biometry_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -181,19 +181,6 @@ class BiometryService {
}
}

/// This method typically called after password of seed was changed.
/// If biometry enabled - update password of [publicKey] in storage
/// even if there was no password before, because if biometry enabled, we must
/// store all passwords.
Future<void> updatePasswordIfPossible({
required PublicKey publicKey,
required String newPassword,
}) async {
if (isEnabled) {
return setKeyPassword(publicKey: publicKey, password: newPassword);
}
}

/// Try to authenticate user with biometry or throw exception.
/// Attempts count are managed by system.
Future<bool> _authenticate(String localizedReason) async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ class ChangeSeedPasswordModel extends ElementaryModel {
newPassword: newPassword,
);

await _biometryService.updatePasswordIfPossible(
await _biometryService.setKeyPassword(
publicKey: publicKey,
newPassword: newPassword,
password: newPassword,
);
await _passwordService.reset(publicKey);
}

Future<bool> checkKeyPassword({
Expand Down