Skip to content
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.

Commit

Permalink
fix: change biometrics label when waiting for passcode validation
Browse files Browse the repository at this point in the history
  • Loading branch information
radko93 committed Nov 24, 2020
1 parent 5734f12 commit 401360e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/screens/Authenticate/Authenticate.tsx
Expand Up @@ -81,8 +81,12 @@ export const Authenticate = ({
} as ChallengeValue;
return map;
}, {} as Record<string, ChallengeValue>),
challengeValueStates: challenge.prompts.reduce((map, current) => {
map[current.id] = AuthenticationValueStateType.WaitingInput;
challengeValueStates: challenge.prompts.reduce((map, current, index) => {
if (index === 0) {
map[current.id] = AuthenticationValueStateType.WaitingInput;
} else {
map[current.id] = AuthenticationValueStateType.WaitingTurn;
}
return map;
}, {} as Record<string, AuthenticationValueStateType>),
},
Expand Down
1 change: 1 addition & 0 deletions src/screens/Authenticate/helpers.ts
Expand Up @@ -158,6 +158,7 @@ export const getLabelForStateAndType = (
case ChallengeValidation.Biometric: {
switch (state) {
case AuthenticationValueStateType.WaitingTurn:
return 'Waiting for passcode.';
case AuthenticationValueStateType.WaitingInput:
return 'Press here to begin biometrics scan.';
case AuthenticationValueStateType.Pending:
Expand Down

0 comments on commit 401360e

Please sign in to comment.