Skip to content

Commit 356a3f4

Browse files
fix: issue WEBREL-3238 (deriv-com#17209) (deriv-com#17215)
* fix: issue WEBREL-3238 * fix: failing testcase Co-authored-by: Likhith Kolayari <[email protected]>
1 parent 598f58b commit 356a3f4

File tree

5 files changed

+18
-4
lines changed

5 files changed

+18
-4
lines changed

packages/account/src/Components/poi/status/verified/verified.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ import { localize } from '@deriv/translations';
44
import { TPOIStatus } from 'Types';
55
import IconMessageContent from '../../../icon-message-content';
66
import PoaButton from '../../../poa/poa-button';
7+
import { service_code } from '../../../../Sections/Verification/ProofOfIdentity/proof-of-identity-utils';
78

8-
export const Verified = ({ needs_poa, redirect_button, is_from_external }: TPOIStatus) => {
9-
const message = localize('Your proof of identity is verified');
9+
export const Verified = ({ needs_poa, redirect_button, is_from_external, service }: TPOIStatus) => {
10+
const message =
11+
service === service_code.idv
12+
? localize('ID verification passed')
13+
: localize('Your proof of identity is verified');
1014

1115
if (!needs_poa) {
1216
return (

packages/account/src/Sections/Verification/ProofOfIdentity/__tests__/proof-of-identity-container.spec.js

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ jest.mock('@deriv/components', () => ({
2222
jest.mock('../../Helpers/verification.js', () => ({
2323
populateVerificationStatus: jest.fn().mockReturnValue({
2424
is_age_verified: false,
25+
identity_last_attempt: {
26+
service: 'idv',
27+
},
2528
}),
2629
}));
2730

packages/account/src/Sections/Verification/ProofOfIdentity/onfido.jsx

+7-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import UploadComplete from '../../../Components/poi/status/upload-complete';
44
import Verified from '../../../Components/poi/status/verified';
55
import RejectedReasons from '../../../Components/poi/status/rejected-reasons';
66
import Unsupported from '../../../Components/poi/status/unsupported';
7-
import { identity_status_codes } from './proof-of-identity-utils';
7+
import { identity_status_codes, service_code } from './proof-of-identity-utils';
88

99
const Onfido = ({
1010
handleRequireSubmission,
@@ -51,7 +51,12 @@ const Onfido = ({
5151
}
5252
case identity_status_codes.verified:
5353
return (
54-
<Verified is_from_external={is_from_external} needs_poa={needs_poa} redirect_button={redirect_button} />
54+
<Verified
55+
is_from_external={is_from_external}
56+
needs_poa={needs_poa}
57+
redirect_button={redirect_button}
58+
service={service_code.onfido}
59+
/>
5560
);
5661
default:
5762
return null;

packages/account/src/Sections/Verification/ProofOfIdentity/proof-of-identity-container.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ const ProofOfIdentityContainer = observer(
195195
is_from_external={!!is_from_external}
196196
needs_poa={needs_poa}
197197
redirect_button={redirect_button}
198+
service={identity_last_attempt?.service}
198199
/>
199200
);
200201
case identity_status_codes.expired:

packages/account/src/Types/common.type.ts

+1
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ export type TPOIStatus = {
115115
redirect_button?: React.ReactElement;
116116
is_from_external?: boolean;
117117
is_manual_upload?: boolean;
118+
service?: string;
118119
};
119120

120121
export type TConfirmPersonalDetailsForm = Pick<

0 commit comments

Comments
 (0)