diff --git a/app/containers/TextInput/FormTextInput.tsx b/app/containers/TextInput/FormTextInput.tsx index 5c208d9659..a3b7e27638 100644 --- a/app/containers/TextInput/FormTextInput.tsx +++ b/app/containers/TextInput/FormTextInput.tsx @@ -100,7 +100,7 @@ export const FormTextInput = ({ return ( {label ? ( diff --git a/app/containers/TwoFactor/index.tsx b/app/containers/TwoFactor/index.tsx index dc0dcde1c5..785df41849 100644 --- a/app/containers/TwoFactor/index.tsx +++ b/app/containers/TwoFactor/index.tsx @@ -80,7 +80,7 @@ const TwoFactor = React.memo(() => { } } } catch (e) { - log(e) + log(e); } }; @@ -93,7 +93,9 @@ const TwoFactor = React.memo(() => { } }, [data]); - const showTwoFactor = (args: EventListenerMethod) => setData(args); + const showTwoFactor = (args: EventListenerMethod) => { + setData(args); + }; useEffect(() => { const listener = EventEmitter.addEventListener(TWO_FACTOR, showTwoFactor); @@ -123,7 +125,12 @@ const TwoFactor = React.memo(() => { const color = colors.fontTitlesLabels; return ( - + } + avoidKeyboard + useNativeDriver + isVisible={visible} + hideModalContentWhileAnimating> { {I18n.t(method?.title || 'Two_Factor_Authentication')} {method?.text ? {I18n.t(method.text)} : null} InteractionManager.runAfterInteractions(() => e?.getNativeRef()?.focus())} returnKeyType='send' autoCapitalize='none' + testID='two-factor-input' + accessibilityLabel={I18n.t( + data?.method === 'password' ? 'Label_Input_Two_Factor_Password' : 'Label_Input_Two_Factor_Code' + )} + value={code} + inputRef={(e: any) => InteractionManager.runAfterInteractions(() => e?.getNativeRef()?.focus())} onChangeText={setCode} onSubmitEditing={onSubmit} keyboardType={method?.keyboardType} secureTextEntry={method?.secureTextEntry} error={data.invalid ? { error: 'totp-invalid', reason: I18n.t('Code_or_password_invalid') } : undefined} - testID='two-factor-input' + containerStyle={styles.containerInput} /> + {isEmail ? (