Skip to content

Commit 0fb471c

Browse files
authored
[CFDS-4846] Suisin/chore: fix misleading info when creating DXTrader account (deriv-com#17823)
* chore: fix misleading info when creating DXTrader account * chore: update code based on comments
1 parent 01c0d41 commit 0fb471c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

packages/cfd/src/Containers/cfd-password-modal.tsx

+7-4
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ type TPasswordModalHeaderProps = {
7878
};
7979

8080
type TCFDPasswordFormReusedProps = {
81-
platform: typeof CFD_PLATFORMS[keyof typeof CFD_PLATFORMS];
81+
platform: (typeof CFD_PLATFORMS)[keyof typeof CFD_PLATFORMS];
8282
error_message: string;
8383
validatePassword: (values: TCFDPasswordFormValues) => FormikErrors<TCFDPasswordFormValues>;
8484
};
@@ -119,7 +119,7 @@ type TCFDPasswordFormProps = TCFDPasswordFormReusedProps & {
119119
type TCFDPasswordModalProps = {
120120
error_type?: string;
121121
form_error?: string;
122-
platform: typeof CFD_PLATFORMS[keyof typeof CFD_PLATFORMS];
122+
platform: (typeof CFD_PLATFORMS)[keyof typeof CFD_PLATFORMS];
123123
};
124124

125125
const PasswordModalHeader = ({
@@ -368,7 +368,10 @@ const CFDPasswordForm = observer(
368368
const { isDesktop } = useDevice();
369369
const { jurisdiction_selected_shortcode } = useCfdStore();
370370
const [checked, setChecked] = React.useState(false);
371-
const need_tnc = jurisdiction_selected_shortcode !== 'svg' && account_type.category === CATEGORY.REAL;
371+
const need_tnc =
372+
jurisdiction_selected_shortcode !== 'svg' &&
373+
account_type.category === CATEGORY.REAL &&
374+
platform === CFD_PLATFORMS.MT5;
372375

373376
const button_label = React.useMemo(() => {
374377
if (error_type === 'PasswordReset') {
@@ -486,7 +489,7 @@ const CFDPasswordForm = observer(
486489
/>
487490
</Text>
488491
)}
489-
{account_type.category === CATEGORY.REAL && (
492+
{account_type.category === CATEGORY.REAL && platform === CFD_PLATFORMS.MT5 && (
490493
<CfdPasswordModalTnc
491494
className='cfd-password-modal-tnc--bottom'
492495
platform={platform}

0 commit comments

Comments
 (0)