Skip to content

Commit

Permalink
feat: move the pin rules below the pin input (#1316)
Browse files Browse the repository at this point in the history
Signed-off-by: FarjadGov14 <[email protected]>
  • Loading branch information
FarjadGov14 authored Nov 15, 2024
1 parent 8d8e559 commit 0cb0d17
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions packages/legacy/core/App/localization/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ const translation = {
"NoRepetitionOfTheTwoSameNumbersValidation": "Does not contain repeating two-digit sequence.",
"NoSeriesOfNumbersValidation": "Does not contain a series of numbers (123).",
"PINOnlyContainDigitsValidation": "Must contain only digits.",
"PINTooShortValidation": "The PIN is long enought.",
"PINTooLongValidation": "The PIN is long enought.",
"PINTooShortValidation": "The PIN is not long enough.",
"PINTooLongValidation": "The PIN is too long enough.",
},
"UserAuthenticationPIN": "User authentication PIN",
"PINTooShort": "PIN is too short",
Expand Down
36 changes: 18 additions & 18 deletions packages/legacy/core/App/screens/PINCreate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -281,24 +281,6 @@ const PINCreate: React.FC<PINCreateProps> = ({ setAuthenticated, explainedStatus
autoFocus={false}
inlineMessage={inlineMessageField1}
/>
{PINSecurity.displayHelper && (
<View style={{ marginBottom: 16 }}>
{PINOneValidations.map((validation, index) => {
return (
<View style={{ flexDirection: 'row' }} key={index}>
{validation.isInvalid ? (
<Icon name="clear" size={iconSize} color={ColorPallet.notification.errorIcon} />
) : (
<Icon name="check" size={iconSize} color={ColorPallet.notification.successIcon} />
)}
<Text style={[TextTheme.normal, { paddingLeft: 4 }]}>
{t(`PINCreate.Helper.${validation.errorName}`)}
</Text>
</View>
)
})}
</View>
)}
<PINInput
label={t('PINCreate.ReenterPIN', { new: updatePin ? t('PINCreate.NewPIN') + ' ' : '' })}
onPINChanged={(p: string) => {
Expand All @@ -321,6 +303,24 @@ const PINCreate: React.FC<PINCreateProps> = ({ setAuthenticated, explainedStatus
ref={PINTwoInputRef}
inlineMessage={inlineMessageField2}
/>
{PINSecurity.displayHelper && (
<View style={{ marginBottom: 16 }}>
{PINOneValidations.map((validation, index) => {
return (
<View style={{ flexDirection: 'row' }} key={index}>
{validation.isInvalid ? (
<Icon name="clear" size={iconSize} color={ColorPallet.notification.errorIcon} />
) : (
<Icon name="check" size={iconSize} color={ColorPallet.notification.successIcon} />
)}
<Text style={[TextTheme.normal, { paddingLeft: 4 }]}>
{t(`PINCreate.Helper.${validation.errorName}`)}
</Text>
</View>
)
})}
</View>
)}
{modalState.visible && (
<AlertModal
title={modalState.title}
Expand Down

0 comments on commit 0cb0d17

Please sign in to comment.