Skip to content

Commit d5b0736

Browse files
amina-derivDhruv-derivlikhith-deriv
authored
[COJ/TRAH-3427]-Dhruv/amina mt5 defaulting jurisdiction (deriv-com#17343)
* chore: empty commit * fix: Removed Jurisdiction, POI, POA, Personal details from mt5 * fix: removed comments * fix: fixec * fix: removed styles * fix: removed POI files for mt5 * fix: modal * fix: removed store variables * fix: Add_and_enter_password_modals * fix: mt5 default account * fix: resolved comments and added file which was removed * fix: testing modal * fix: style * fix: Removed and fixed the styles of MT5 password model * fix: cleaned up code * fix: restored deleted file * chore: added testcases for MT5CreatePassword * fix: cleaned the code * fix: password * fix: modifies test case * fix: merges fixed * fix: added test case for Mt5CreatePassword * fix: empty commit for merging * fix: added test cases1 * fix: added test cases2 * fix: cleaned code and removed unnecessary styles from scss * fix: code recovered * fix: cleaned code added missing style * fix: reaolved comments2 * fix: resolved comments3 * fix: resolved comments4 * fix: resolved comments5 * fix: added icon testcase * fix: cleaned coded2 * fix: rectified styles and changed names of style classes * fix: cleaned code and styles * chore: remove failed verification modal * fix: resolved comments * fix: resolved comments2 * fix: resolved comments3 * fix: resolved comments4 * fix: cleaned testcases * fix: resolved testcases * fix: sanity check on styles of modal1 * fix: remove modal * fix: fixed banner design * fix: added icons * feat: modal * fix: defaulting * fix: modal content * fix: addes styling to icon * fix: fixed banners1 * fix: fixed banners2 * fix: fixed banners3 * fix: fixed banners4 * fix: fixed banners5 * fix: content * fix: content * fix: badge * fix: test cases for appstore and account * fix: password modal badge * fix: alligned card items * fix: test cases * fix: fixed icons * fix: icon arrow color fix * fix: icon arrow color fix2 * fix: fixed switch case * fix: fixed scss file * feat: Api changes * fix: types * fix: added testcases for verification modal * fix: cleaned code * fix: comparea ccount * fix: test * fix: content * fix: added testcases * fix: added testcases2 * fix: test comments 3 * fix: test comments 4 * fix: test * fix: test cases * fix: test * fix: style * fix: color * fix: stp accounts * fix: test case * fix: real account * fix: cashier_fixes * fix: type * fix: test * fix: test * fix: dark mode * fix: dark mode * fix: test case * fix: test case * fix: test * fix: fetching updated value * fix: Design fixes1 * fix: Fixed reloading badge issue * fix: fixed build issue * fix: review commits * fix: resolve code review comments * fix: added hover feature and pointer arrow on list enabled item * fix: compare accounts * fix: fixed hover speed and color * fix: modal content and styling * fix: modal content and styling * fix: test * fix: resolved comments1 * fix: demo title * fix: test case * fix: transfer button * fix: merge master * fix: types * fix: transfer modal * fix: zero spread * fix: scroll fix * fix: Resolved badge status issue * Merge branch 'master' into dhruv/amina_mt5_defaulting_jurisdiction * fix: fixed the badges for mt5_login_list status * feat: stp account * fix: handled the version of quill icons reducing bundle size * fix: Fixed size of img * fix: test * fix: pobox * fix: poa redirection * fix: test * fix: type * fix: conflict * fix: type * fix: type --------- Co-authored-by: Dhruv Neb <[email protected]> Co-authored-by: Likhith Kolayari <[email protected]> Co-authored-by: likhith <[email protected]>
1 parent e4f7fc3 commit d5b0736

File tree

157 files changed

+3139
-7739
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+3139
-7739
lines changed

package-lock.json

+146-150
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/account/build/webpack.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ module.exports = function (env) {
1616
'financial-details-config': 'Configs/financial-details-config',
1717
'get-status-badge-config': 'Configs/get-status-badge-config',
1818
'personal-details-config': 'Configs/personal-details-config',
19-
'poi-poa-docs-submitted': 'Components/poi-poa-docs-submitted/poi-poa-docs-submitted',
2019
'risk-tolerance-warning-modal': 'Components/trading-assessment/risk-tolerance-warning-modal',
2120
'sent-email-modal': 'Components/sent-email-modal',
2221
'terms-of-use-config': 'Configs/terms-of-use-config',

packages/account/src/Components/poa/status/needs-review/__tests__/needs-review-spec.tsx

-51
This file was deleted.

packages/account/src/Components/poa/status/needs-review/index.ts

-3
This file was deleted.

packages/account/src/Components/poa/status/needs-review/needs-review.tsx

-37
This file was deleted.

packages/account/src/Components/poa/status/submitted/__tests__/submitted.spec.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ describe('<Submitted />', () => {
1414

1515
it('should render the Submitted component', () => {
1616
renderWithRouter(<Submitted needs_poi />);
17-
expect(screen.getByText('Your documents were submitted successfully')).toBeInTheDocument();
17+
expect(screen.getByText('Review in progress')).toBeInTheDocument();
1818
});
1919

2020
it('should show submit_poi message if needs_poi is true', () => {
2121
renderWithRouter(<Submitted needs_poi />);
22-
expect(screen.getByText('You must also submit a proof of identity.')).toBeInTheDocument();
22+
expect(screen.getByText('To start trading, you also need to verify your identity.')).toBeInTheDocument();
2323
});
2424

2525
it('should show review message if needs_poi is true', () => {
2626
renderWithRouter(<Submitted needs_poi />);
2727
expect(
28-
screen.getByText('We’ll review your documents and notify you of its status within 1 to 3 days.')
28+
screen.getByText('Your proof of address is under review. We’ll get back to you in 1–3 working days.')
2929
).toBeInTheDocument();
3030
});
3131

3232
it('should show ContinueTradingButton if no props are passed', () => {
3333
renderWithRouter(<Submitted />);
34-
expect(screen.getByTestId('continue-trading-button')).toBeInTheDocument();
34+
expect(screen.getByText("Return to Trader's Hub")).toBeInTheDocument();
3535
});
3636
});

packages/account/src/Components/poa/status/submitted/submitted.tsx

+13-9
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
import React from 'react';
22
import { Icon, Text } from '@deriv/components';
33
import { localize } from '@deriv/translations';
4-
import { isNavigationFromP2P, isNavigationFromDerivGO } from '@deriv/shared';
5-
import ContinueTradingButton from '../../continue-trading-button';
4+
import { isNavigationFromP2P, isNavigationFromDerivGO, routes } from '@deriv/shared';
65
import IconMessageContent from '../../../icon-message-content';
7-
import PoiButton from '../../../poi/poi-button';
6+
import RouteButton from '../../../route-button';
87
import { TPoaStatusProps } from '../../../../Types';
98

109
export const Submitted = ({ needs_poi, redirect_button }: TPoaStatusProps) => {
11-
const message = localize('Your documents were submitted successfully');
10+
const message = localize('Review in progress');
1211
const is_redirected_from_platform = isNavigationFromP2P() || isNavigationFromDerivGO();
1312
if (needs_poi) {
1413
return (
1514
<div className='account-management__container'>
1615
<IconMessageContent message={message} icon={<Icon icon='IcPoaVerified' size={128} />}>
1716
<div className='account-management__text-container'>
1817
<Text align='center' size='xs' as='p'>
19-
{localize('We’ll review your documents and notify you of its status within 1 to 3 days.')}
18+
{localize(
19+
'Your proof of address is under review. We’ll get back to you in 1–3 working days.'
20+
)}
2021
</Text>
2122
<Text align='center' size='xs' as='p'>
22-
{localize('You must also submit a proof of identity.')}
23+
{localize('To start trading, you also need to verify your identity.')}
2324
</Text>
2425
</div>
25-
<PoiButton />
26+
<RouteButton button_label={localize('Next')} route={routes.proof_of_identity} />
2627
</IconMessageContent>
2728
</div>
2829
);
@@ -31,10 +32,13 @@ export const Submitted = ({ needs_poi, redirect_button }: TPoaStatusProps) => {
3132
<div className='account-management__container'>
3233
<IconMessageContent
3334
message={message}
34-
text={localize('We’ll review your documents and notify you of its status within 1 to 3 days.')}
35+
text={localize('Your proof of address is under review. We’ll get back to you in 1–3 working days.')}
3536
icon={<Icon icon='IcPoaVerified' size={128} />}
3637
>
37-
{redirect_button || (!is_redirected_from_platform && <ContinueTradingButton />)}
38+
{redirect_button ||
39+
(!is_redirected_from_platform && (
40+
<RouteButton button_label={localize("Return to Trader's Hub")} route={routes.traders_hub} />
41+
))}
3842
</IconMessageContent>
3943
</div>
4044
);

packages/account/src/Components/poi-poa-docs-submitted/poi-poa-docs-submitted.tsx

-73
This file was deleted.

packages/account/src/Components/poi/idv-status/idv-submit-complete/__tests__/idv-submit-complete.spec.tsx

+9-19
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,12 @@ describe('<IdvSubmitComplete/>', () => {
5151

5252
expect(screen.getByText('DerivLightWaitingPoiIcon')).toBeInTheDocument();
5353
expect(screen.getByText('Mock Redirect Button')).toBeInTheDocument();
54-
expect(screen.getByText('Your documents were submitted successfully')).toBeInTheDocument();
55-
expect(
56-
screen.getByText('We’ll review your documents and notify you of its status within 5 minutes.')
57-
).toBeInTheDocument();
5854
expect(screen.queryByText('Your profile is updated')).not.toBeInTheDocument();
59-
expect(screen.queryByText('Your document has been submitted')).not.toBeInTheDocument();
55+
expect(screen.queryByText('Review in progress')).toBeInTheDocument();
6056
expect(
61-
screen.queryByText(
62-
"We'll review your proof of identity again and will give you an update as soon as possible."
63-
)
64-
).not.toBeInTheDocument();
65-
expect(screen.queryByText("Next, we'll need your proof of address.")).not.toBeInTheDocument();
57+
screen.queryByText('Your proof of identity is under review. We’ll get back to you within 5 minutes.')
58+
).toBeInTheDocument();
59+
expect(screen.queryByText('To start trading, you also need to verify your address.')).not.toBeInTheDocument();
6660
});
6761

6862
it('should render IdvSubmitComplete component needs_poa not external, without mismatch_status and redirect_button', () => {
@@ -74,16 +68,12 @@ describe('<IdvSubmitComplete/>', () => {
7468
renderComponent({ props: new_props });
7569

7670
expect(screen.getByText('DerivLightWaitingPoiIcon')).toBeInTheDocument();
77-
expect(screen.getByText('Your documents were submitted successfully')).toBeInTheDocument();
78-
expect(screen.getByText('Submit proof of address')).toBeInTheDocument();
79-
expect(screen.getByText("Next, we'll need your proof of address.")).toBeInTheDocument();
80-
expect(screen.queryByText('Your profile is updated')).not.toBeInTheDocument();
81-
expect(screen.queryByText('Your document has been submitted')).not.toBeInTheDocument();
71+
expect(screen.queryByText('Review in progress')).toBeInTheDocument();
8272
expect(
83-
screen.queryByText(
84-
"We'll review your proof of identity again and will give you an update as soon as possible."
85-
)
86-
).not.toBeInTheDocument();
73+
screen.queryByText('Your proof of identity is under review. We’ll get back to you within 5 minutes.')
74+
).toBeInTheDocument();
75+
expect(screen.queryByText('To start trading, you also need to verify your address.')).toBeInTheDocument();
76+
expect(screen.queryByText('Next')).toBeInTheDocument();
8777
});
8878

8979
it('should render IdvSubmitComplete component with mismatch_status ', () => {

packages/account/src/Components/poi/idv-status/idv-submit-complete/idv-submit-complete.tsx

+4-6
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const IdvSubmitComplete = observer(
3333
if (is_expired_or_failed_error)
3434
return <Localize i18n_default_text='Your document has been submitted' />;
3535
}
36-
return <Localize i18n_default_text='Your documents were submitted successfully' />;
36+
return <Localize i18n_default_text='Review in progress' />;
3737
};
3838

3939
const getDescriptionText = () => {
@@ -42,13 +42,11 @@ const IdvSubmitComplete = observer(
4242
<Localize i18n_default_text="We'll review your proof of identity again and will give you an update as soon as possible." />
4343
);
4444
return (
45-
<Localize i18n_default_text='We’ll review your documents and notify you of its status within 5 minutes.' />
45+
<Localize i18n_default_text='Your proof of identity is under review. We’ll get back to you within 5 minutes.' />
4646
);
4747
};
4848

49-
const poa_button = !is_from_external && (
50-
<PoaButton custom_text={<Localize i18n_default_text='Submit proof of address' />} />
51-
);
49+
const poa_button = !is_from_external && <PoaButton custom_text={<Localize i18n_default_text='Next' />} />;
5250

5351
return (
5452
<div className={clsx('proof-of-identity__container', 'proof-of-identity__container--status')}>
@@ -62,7 +60,7 @@ const IdvSubmitComplete = observer(
6260
{needs_poa ? (
6361
<React.Fragment>
6462
<Text className='text' size='xs' align='center'>
65-
<Localize i18n_default_text="Next, we'll need your proof of address." />
63+
<Localize i18n_default_text='To start trading, you also need to verify your address.' />
6664
</Text>
6765
{poa_button}
6866
</React.Fragment>

packages/account/src/Components/poi/status/unsupported/detail-component.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ type TDetailComponent = {
3131
is_from_external?: boolean;
3232
is_for_mt5?: boolean;
3333
handlePOIforMT5Complete?: () => void;
34+
needs_poa?: boolean;
3435
};
3536

3637
const DetailComponent = ({
@@ -44,6 +45,7 @@ const DetailComponent = ({
4445
is_from_external,
4546
is_for_mt5,
4647
handlePOIforMT5Complete,
48+
needs_poa,
4749
...props
4850
}: TDetailComponent) => {
4951
const [status, setStatus] = React.useState('');
@@ -121,7 +123,7 @@ const DetailComponent = ({
121123
case STATUS.IS_UPLOADING:
122124
return <Loading is_fullscreen={false} is_slow_loading status={[localize('Uploading documents')]} />;
123125
case STATUS.IS_COMPLETED:
124-
return <UploadComplete is_from_external={true} needs_poa={false} is_manual_upload />;
126+
return <UploadComplete is_from_external needs_poa={needs_poa} is_manual_upload />;
125127
case STATUS.IS_FAILED:
126128
return <POIManualUploadFailed error={response_error} />;
127129
case STATUS.IS_DUPLICATE_UPLOAD:

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

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ const Unsupported = ({
9393
handlePOIforMT5Complete={handlePOIforMT5Complete}
9494
handleComplete={handleViewComplete}
9595
is_for_mt5={is_for_mt5}
96+
needs_poa={needs_poa}
9697
{...props}
9798
/>
9899
);

0 commit comments

Comments
 (0)