Skip to content

Commit

Permalink
Decide validation result based on identity
Browse files Browse the repository at this point in the history
In a case of API call fails decide on validation result based on known identity chain data
  • Loading branch information
aidenaio committed Apr 6, 2023
1 parent f2ec015 commit 48e92bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion renderer/screens/validation/report/machines.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@ export const validationReportMachine = createMachine({
),
],
},
failed: {},
failed: {
entry: [
assign({
validationResult: ({identity: {isValidated}}) =>
isValidated ? ValidationResult.Success : ValidationResult.Fail,
}),
],
},
},
})
1 change: 1 addition & 0 deletions renderer/screens/validation/report/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export const ValidationResult = {
LateSubmission: 'late',
MissedValidation: 'missed',
WrongAnswers: 'wrong',
Fail: 'fail',
}

0 comments on commit 48e92bb

Please sign in to comment.