Skip to content

Commit

Permalink
fix: issue WEBREL-3238 (#17209) (#17215)
Browse files Browse the repository at this point in the history
* fix: issue WEBREL-3238

* fix: failing testcase

Co-authored-by: Likhith Kolayari <[email protected]>
  • Loading branch information
heorhi-deriv and likhith-deriv authored Oct 16, 2024
1 parent 598f58b commit 356a3f4
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ import { localize } from '@deriv/translations';
import { TPOIStatus } from 'Types';
import IconMessageContent from '../../../icon-message-content';
import PoaButton from '../../../poa/poa-button';
import { service_code } from '../../../../Sections/Verification/ProofOfIdentity/proof-of-identity-utils';

export const Verified = ({ needs_poa, redirect_button, is_from_external }: TPOIStatus) => {
const message = localize('Your proof of identity is verified');
export const Verified = ({ needs_poa, redirect_button, is_from_external, service }: TPOIStatus) => {
const message =
service === service_code.idv
? localize('ID verification passed')
: localize('Your proof of identity is verified');

if (!needs_poa) {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jest.mock('@deriv/components', () => ({
jest.mock('../../Helpers/verification.js', () => ({
populateVerificationStatus: jest.fn().mockReturnValue({
is_age_verified: false,
identity_last_attempt: {
service: 'idv',
},
}),
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import UploadComplete from '../../../Components/poi/status/upload-complete';
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';
import { identity_status_codes, service_code } from './proof-of-identity-utils';

const Onfido = ({
handleRequireSubmission,
Expand Down Expand Up @@ -51,7 +51,12 @@ const Onfido = ({
}
case identity_status_codes.verified:
return (
<Verified is_from_external={is_from_external} needs_poa={needs_poa} redirect_button={redirect_button} />
<Verified
is_from_external={is_from_external}
needs_poa={needs_poa}
redirect_button={redirect_button}
service={service_code.onfido}
/>
);
default:
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ const ProofOfIdentityContainer = observer(
is_from_external={!!is_from_external}
needs_poa={needs_poa}
redirect_button={redirect_button}
service={identity_last_attempt?.service}
/>
);
case identity_status_codes.expired:
Expand Down
1 change: 1 addition & 0 deletions packages/account/src/Types/common.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export type TPOIStatus = {
redirect_button?: React.ReactElement;
is_from_external?: boolean;
is_manual_upload?: boolean;
service?: string;
};

export type TConfirmPersonalDetailsForm = Pick<
Expand Down

0 comments on commit 356a3f4

Please sign in to comment.