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

farrah/fix: added poa_authenticated_with_idv_photo #17308

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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 @@ -17,6 +17,9 @@ export const populateVerificationStatus = account_status => {
const poa_address_mismatch = account_status.status.some(status => status === 'poa_address_mismatch');
const poi_expiring_soon = account_status.status.some(status => status === 'poi_expiring_soon');
const poa_authenticated_with_idv = account_status.status.some(status => status === 'poa_authenticated_with_idv');
const poa_authenticated_with_idv_photo = account_status.status.some(
status => status === 'poa_authenticated_with_idv_photo'
);
const poa_expiring_soon = account_status.status.some(status => status === 'poa_expiring_soon');

const has_poa = !(document && document.status === 'none');
Expand Down Expand Up @@ -57,6 +60,7 @@ export const populateVerificationStatus = account_status => {
onfido,
poa_address_mismatch,
poa_authenticated_with_idv,
poa_authenticated_with_idv_photo,
poi_expiring_soon,
poa_expiring_soon,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type TAuthenticationStatus = Record<
| 'resubmit_poa'
| 'poa_expiring_soon'
| 'poa_authenticated_with_idv'
| 'poa_authenticated_with_idv_photo'
| 'has_submitted_duplicate_poa',
boolean
> & { document_status?: DeepRequired<GetAccountStatus>['authentication']['document']['status'] };
Expand All @@ -50,6 +51,7 @@ const ProofOfAddressContainer = observer(({ onSubmit }: TProofOfAddressContainer
poa_address_mismatch: false,
poa_expiring_soon: false,
poa_authenticated_with_idv: false,
poa_authenticated_with_idv_photo: false,
has_submitted_duplicate_poa: false,
});

Expand All @@ -74,6 +76,7 @@ const ProofOfAddressContainer = observer(({ onSubmit }: TProofOfAddressContainer
needs_poi,
poa_address_mismatch,
poa_authenticated_with_idv,
poa_authenticated_with_idv_photo,
poa_expiring_soon,
} = populateVerificationStatus(get_account_status);

Expand All @@ -88,6 +91,7 @@ const ProofOfAddressContainer = observer(({ onSubmit }: TProofOfAddressContainer
needs_poi,
poa_address_mismatch,
poa_authenticated_with_idv,
poa_authenticated_with_idv_photo,
poa_expiring_soon,
}));
setIsLoading(false);
Expand Down Expand Up @@ -136,6 +140,7 @@ const ProofOfAddressContainer = observer(({ onSubmit }: TProofOfAddressContainer
poa_address_mismatch,
poa_expiring_soon,
poa_authenticated_with_idv,
poa_authenticated_with_idv_photo,
has_submitted_duplicate_poa,
} = authentication_status;

Expand All @@ -151,7 +156,8 @@ const ProofOfAddressContainer = observer(({ onSubmit }: TProofOfAddressContainer
['expired', 'rejected', 'suspected'].includes(document_status)) ||
poa_address_mismatch ||
poa_expiring_soon ||
(poa_authenticated_with_idv && from_platform?.route === routes.cashier_p2p);
((poa_authenticated_with_idv || poa_authenticated_with_idv_photo) &&
from_platform?.route === routes.cashier_p2p);

const redirect_button = should_show_redirect_btn && (
<Button
Expand Down
Loading