Unverified Commit 53f255ff authored by Hanwen Cheng's avatar Hanwen Cheng Committed by GitHub
Browse files

fix: use alphabetic password input (#641)

parent c6e240ac
Pipeline #95837 failed with stages
in 52 seconds
......@@ -401,4 +401,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 02c652495fcdb3f6e77b8325efde1d197e8189dd
COCOAPODS: 1.9.1
COCOAPODS: 1.9.2
ARCHS_IOS = x86_64-apple-ios armv7-apple-ios armv7s-apple-ios aarch64-apple-ios
ARCHS_ANDROID = aarch64-linux-android armv7-linux-androideabi i686-linux-android
LIB=libsigner.a
API_LEVEL=$(shell grep API_LEVEL scripts/variables.sh |tr -c -d '[:digit:]')
API_LEVEL=$(shell grep API_LEVEL ../../scripts/variables.sh |tr -c -d '[:digit:]')
OS_ARCH=$(shell uname | tr '[:upper:]' '[:lower:]')
ANDROID_PREBUILD_BIN="${NDK_HOME}/toolchains/llvm/prebuilt/${OS_ARCH}-x86_64/bin"
......
......@@ -14,7 +14,7 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import React, { MutableRefObject } from 'react';
import { StyleSheet, TextInputProps } from 'react-native';
import { KeyboardTypeOptions, StyleSheet, TextInputProps } from 'react-native';
import TextInput from 'components/TextInput';
import fontStyles from 'styles/fontStyles';
......@@ -23,6 +23,7 @@ import colors from 'styles/colors';
interface PinInputProps extends TextInputProps {
label: string;
focus?: boolean;
keyboardType?: KeyboardTypeOptions;
ref?: MutableRefObject<TextInput | null>;
}
......@@ -31,7 +32,7 @@ export default function PinInput(props: PinInputProps): React.ReactElement {
<TextInput
keyboardAppearance="dark"
editable
keyboardType="numeric"
keyboardType={props.keyboardType ?? 'numeric'}
multiline={false}
autoCorrect={false}
numberOfLines={1}
......
......@@ -90,6 +90,7 @@ function PinUnlockWithPassword({
label={t.passwordLabel}
testID={testIDs.IdentityPin.passwordInput}
returnKeyType="done"
keyboardType="default"
focus={focusPassword}
onChangeText={onPasswordInputChange}
onSubmitEditing={submit}
......
......@@ -59,5 +59,5 @@ export const scanRequestDataMap = {
'47b7b22616374696f6e223a227369676e44617461222c2264617461223a7b226163636f756e74223a2233313161364430333334313431353937383238393939636338396346656237333864303646646332222c2264617461223a22343236353635373232303639373332303734363836353732363137303739227d7d0ec11ec11ec11ec11ec11ec11ec11ec11ec11ec11ec11ec11ec11ec11ec'
},
[ScanTestRequest.passwordedAccountExtrinsic]:
'400b90000010000530102a225ba2fe8ba7a2a70b6a0801734b20ba9a5d5f6549fc0c9544fc64d9f58a45ea004001e169bcc4cdb062f1c85f971be770b6aea1bd32ac1bf7877aa54ccd73309014a0700e87648175502040026040000b0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe1282fc5d493cdd4e1034db77de8e86da65fda3642e8aaa10a6bd31b8a73e7c14b0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe0ec11ec11ec11ec11ec11ec11ec11ec11ec11ec11ec11ec11ec11ec11'
'49500000100005301028a476a30a7fd07657fa2e3648ec74b76aea0e9c032772ed108b78924539ce61f10000104112501000026040000b0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe3ca87fad296dc36e2070c536142e2e9a74fe221f0b9dbce0e9f85921bd0c5e77b0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe0ec11ec'
};
......@@ -21,7 +21,7 @@ const {
} = testIDs;
const passwordedPath = '//passworded';
const password = '111111';
const password = 'random';
describe('Load test', () => {
testRecoverIdentity();
......@@ -37,15 +37,15 @@ describe('Load test', () => {
it('should sign the set remarks request', async () => {
await launchWithScanRequest(ScanTestRequest.passwordedAccountExtrinsic);
await testTap(SecurityHeader.scanButton);
await testInput(IdentityPin.unlockPinInput, pinCode);
await testInputWithDone(IdentityPin.passwordInput, password);
await testInputWithDone(IdentityPin.unlockPinInput, pinCode);
await testInput(IdentityPin.passwordInput, password);
await testVisible(SignedTx.qrView);
});
it('does only need password again in the second try', async () => {
await tapBack();
await testTap(SecurityHeader.scanButton);
await testInputWithDone(IdentityPin.passwordInput, password);
await testInput(IdentityPin.passwordInput, password);
await testVisible(SignedTx.qrView);
});
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment