Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

likhith/fix: 🐛 display onfido error message #9401

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,10 @@ import UploadComplete from 'Components/poi/status/upload-complete';
import Expired from 'Components/poi/status/expired';
import Verified from 'Components/poi/status/verified';
import RejectedReasons from 'Components/poi/status/rejected-reasons';
import Unsupported from 'Components/poi/status/unsupported';
import { identity_status_codes } from './proof-of-identity-utils';

const Onfido = ({
handleRequireSubmission,
is_from_external,
needs_poa,
onfido,
redirect_button,
manual,
setIsCfdPoiCompleted,
}) => {
const { status, submissions_left, last_rejected: rejected_reasons } = onfido;
const Onfido = ({ handleRequireSubmission, is_from_external, needs_poa, onfido, redirect_button }) => {
const { status, last_rejected: rejected_reasons } = onfido;

switch (status) {
case identity_status_codes.pending:
Expand All @@ -28,15 +19,6 @@ const Onfido = ({
);
case identity_status_codes.rejected:
case identity_status_codes.suspected:
if (Number(submissions_left) < 1) {
return (
<Unsupported
manual={manual}
is_from_external={is_from_external}
setIsCfdPoiCompleted={setIsCfdPoiCompleted}
/>
);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was done as per the requirements during new kyc flow where we show the manual upload when onfido submission is not left. Could you please help to confirm.
Screenshot 2023-07-20 at 2 47 52 PM

https://www.figma.com/file/aDz4wDrPvOLmra2WDnpBNc/Deriv-MT5?type=design&mode=design&t=ppOZThjbRS43kGtq-0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return (
<RejectedReasons
rejected_reasons={rejected_reasons}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,6 @@ const ProofOfIdentityContainer = ({
needs_poa,
onfido,
} = verification_status;
const last_attempt_status = identity_last_attempt?.status;
const is_last_attempt_idv = identity_last_attempt?.service === 'idv';
const is_last_attempt_onfido = identity_last_attempt?.service === 'onfido';
const should_ignore_idv = is_high_risk && is_withdrawal_lock;

if (!should_allow_authentication && !is_age_verified) {
Expand All @@ -117,13 +114,7 @@ const ProofOfIdentityContainer = ({
</Button>
);

if (
identity_status === identity_status_codes.none ||
has_require_submission ||
allow_poi_resubmission ||
(should_ignore_idv && is_last_attempt_idv && manual?.status !== 'verified' && manual?.status !== 'pending') ||
(should_ignore_idv && is_last_attempt_onfido && last_attempt_status === 'rejected')
) {
if (identity_status === identity_status_codes.none || has_require_submission || allow_poi_resubmission) {
return (
<POISubmission
account_settings={account_settings}
Expand Down