Update Wallet password policy (#21051)

Updates Wallet password policy to accept a password with a minimum length of 8 characters.
Modifies also UI strings to reflect the new policy (numbers and special characters are not required anymore).
This commit is contained in:
Simone Arpe
2023-11-21 18:44:34 +01:00
committed by GitHub
parent 4ced6ed30a
commit b0926e4d4e
4 changed files with 34 additions and 57 deletions
@@ -75,29 +75,33 @@ public class UnlockWalletFragment extends CryptoOnboardingFragment {
mUnlockWalletTitle = view.findViewById(R.id.unlock_wallet_title);
mBiometricUnlockWalletImage = view.findViewById(R.id.iv_biometric_unlock_wallet);
mUnlockButton.setOnClickListener(v -> {
if (TextUtils.isEmpty(mUnlockWalletPassword.getText())) {
mUnlockWalletPassword.setError(getString(R.string.password_error));
return;
}
mUnlockButton.setOnClickListener(
v -> {
if (TextUtils.isEmpty(mUnlockWalletPassword.getText())) {
mUnlockWalletPassword.setError(getString(R.string.password_error));
return;
}
KeyringService keyringService = getKeyringService();
if (keyringService != null) {
keyringService.unlock(mUnlockWalletPassword.getText().toString(), result -> {
if (result) {
Utils.clearClipboard(mUnlockWalletPassword.getText().toString(), 0);
mUnlockWalletPassword.setText(null);
if (onNextPage != null) {
Utils.hideKeyboard(getActivity());
onNextPage.gotoNextPage(true);
}
} else {
mUnlockWalletPassword.setError(
getString(R.string.incorrect_password_error));
KeyringService keyringService = getKeyringService();
if (keyringService != null) {
keyringService.unlock(
mUnlockWalletPassword.getText().toString(),
result -> {
if (result) {
Utils.clearClipboard(
mUnlockWalletPassword.getText().toString(), 0);
mUnlockWalletPassword.setText(null);
if (onNextPage != null) {
Utils.hideKeyboard(requireActivity());
onNextPage.gotoNextPage(true);
}
} else {
mUnlockWalletPassword.setError(
getString(R.string.incorrect_password_error));
}
});
}
});
}
});
mUnlockWalletRestoreButton.setOnClickListener(v -> {
if (onNextPage != null) {