Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
Suisin/Changes on authenticate.js to show Manual Upload after Onfido …
Browse files Browse the repository at this point in the history
…fail 3 … (#7269)

* Changes on authenticate.js to show Manual Upload after Onfido fail 3 times

* Update logic for handle manual

* Fix: Displaying Pending Message when websocket network message is in pending

---------

Co-authored-by: Matin shafiei <[email protected]>
  • Loading branch information
suisin-deriv and matin-deriv authored Jan 30, 2023
1 parent ef449b2 commit cd9ec06
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions src/javascript/app/pages/user/account/authenticate.js
Original file line number Diff line number Diff line change
Expand Up @@ -1378,7 +1378,7 @@ const Authenticate = (() => {
case 'suspected':
case 'rejected':
if (Number(submissions_left) < 1) {
$('#limited_poi').setVisibility(1);
handleManual();
} else {
const maximum_reasons = rejected_reasons.slice(0, 3);
const has_minimum_reasons = rejected_reasons.length > 3;
Expand Down Expand Up @@ -1440,13 +1440,32 @@ const Authenticate = (() => {
}
};

const handleManual = () => {
$('#idv-container').setVisibility(0);
const handleManual = async () => {
account_status = await getAccountStatus();
const { manual } = account_status.authentication.identity.services;
const { status } = manual;
$('#authentication_tab').setVisibility(1);
$('#msg_personal_details').setVisibility(1);
TabSelector.updateTabDisplay();
$('#not_authenticated_uns').setVisibility(1);
initUnsupported();

switch (status){
case 'none':
$('#idv-container').setVisibility(0);
$('#msg_personal_details').setVisibility(1);
$('#not_authenticated_uns').setVisibility(1);
initUnsupported();
break;
case 'pending':
$('#idv-container').setVisibility(0);
$('#upload_complete').setVisibility(1);
break;
case 'rejected':
case 'suspected':
$('#idv-container').setVisibility(0);
$('#limited_poi').setVisibility(1);
break;
default:
break;
}
};

const initAuthentication = async () => {
Expand Down

1 comment on commit cd9ec06

@vercel
Copy link

@vercel vercel bot commented on cd9ec06 Jan 30, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

binary-static – ./

binary-static.binary.sx
binary-static-git-master.binary.sx

Please sign in to comment.