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

Suisin/diel flow change #40

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
a8417b8
chore: sign up flow for eu user
suisin-deriv May 19, 2023
378411c
Merge branch 'master' of github.com:binary-com/deriv-app into suisin/…
suisin-deriv May 29, 2023
cf8aeec
Merge branch 'master' of github.com:binary-com/deriv-app into suisin/…
suisin-deriv May 29, 2023
a6975dd
chore: DIEL Flow
suisin-deriv Jun 1, 2023
6516f16
chore: fixed test case error
suisin-deriv Jun 1, 2023
6fd7369
chore: remove scss from inline notw with icon
suisin-deriv Jun 1, 2023
e64db98
Merge branch 'master' of github.com:binary-com/deriv-app into suisin/…
suisin-deriv Jun 2, 2023
7b0d1a2
chore: remove not my changes
suisin-deriv Jun 2, 2023
fc19385
chore: remove not my changes
suisin-deriv Jun 2, 2023
3e2dcdf
chore: update code based on latest pr
suisin-deriv Jun 2, 2023
ccbaad4
chore: update css for address details
suisin-deriv Jun 2, 2023
0740935
Merge branch 'master' of github.com:binary-com/deriv-app into suisin/…
suisin-deriv Jun 6, 2023
bf6758c
Merge branch 'master' of github.com:binary-com/deriv-app into suisin/…
suisin-deriv Jun 6, 2023
94546e4
chore: update code based on comments
suisin-deriv Jun 7, 2023
bf9aa66
chore: remove unused space for for strings
suisin-deriv Jun 7, 2023
3000c16
chore: change props to include is_eu_user
suisin-deriv Jun 7, 2023
56894bd
chore: empty commit
suisin-deriv Jun 7, 2023
4c19a45
chore: remove space from the Text
suisin-deriv Jun 7, 2023
e708544
chore: update all element to use is_eu_user fron traders hub and reve…
suisin-deriv Jun 8, 2023
ea6e1ca
chore: added types and added mobile view cfds multipliers sequence
suisin-deriv Jun 8, 2023
e6582f4
chore: remove commented part for low_risk client
suisin-deriv Jun 8, 2023
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 @@ -23,16 +23,19 @@ import {
PlatformContext,
TLocationList,
} from '@deriv/shared';
import InlineNoteWithIcon from 'Components/inline-note-with-icon';
import { splitValidationResultTypes } from '../real-account-signup/helpers/utils';
import classNames from 'classnames';

type TAddressDetails = {
states_list: TLocationList[];
disabled_items: string[];
getCurrentStep?: () => number;
onSave: (current_step: number, values: FormikValues) => void;
onCancel: (current_step: number, goToPreviousStep: () => void) => void;
goToNextStep: () => void;
goToPreviousStep: () => void;
has_real_account: boolean;
validate: (values: FormikValues) => FormikValues;
onSubmit: (
current_step: number | null,
Expand All @@ -41,7 +44,7 @@ type TAddressDetails = {
next_step: () => void
) => void;
is_svg: boolean;
is_mf?: boolean;
is_eu_user?: boolean;
is_gb_residence: boolean | string;
onSubmitEnabledChange: (is_submit_disabled: boolean) => void;
selected_step_ref?: React.RefObject<FormikProps<FormikValues>>;
Expand Down Expand Up @@ -98,7 +101,7 @@ const AddressDetails = ({
validate,
onSubmit,
is_svg,
is_mf,
is_eu_user,
is_gb_residence,
onSubmitEnabledChange,
selected_step_ref,
Expand Down Expand Up @@ -176,7 +179,18 @@ const AddressDetails = ({
height_offset={is_appstore ? '222px' : '90px'}
is_disabled={isDesktop()}
>
{!is_appstore && (
{is_eu_user && (
<div className='details-form__banner-container'>
<InlineNoteWithIcon
icon='IcAlertWarning'
message={localize(
'For verification purposes as required by regulation. It’s your responsibility to provide accurate and complete answers. You can update personal details at any time in your account settings.'
)}
title={localize('Why do we collect this?')}
/>
</div>
)}
{!is_appstore && !is_eu_user && (
<Text
as='p'
align='left'
Expand All @@ -203,9 +217,9 @@ const AddressDetails = ({
<div className={classNames('details-form__elements', 'address-details-form ')}>
<InputField
name='address_line_1'
required={is_svg || is_appstore || is_mf}
required={is_svg || is_appstore || is_eu_user}
label={
is_svg || is_appstore || is_mf
is_svg || is_appstore || is_eu_user
? localize('First line of address*')
: localize('First line of address')
}
Expand Down Expand Up @@ -233,9 +247,9 @@ const AddressDetails = ({
/>
<InputField
name='address_city'
required={is_svg || is_appstore || is_mf}
required={is_svg || is_appstore || is_eu_user}
label={
is_svg || is_appstore || is_mf
is_svg || is_appstore || is_eu_user
? localize('Town/City*')
: localize('Town/City')
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ describe('<CurrencySelector/>', () => {
const dxtrade_non_eu_msg =
'You are limited to one fiat account. You won’t be able to change your account currency if you have already made your first deposit or created a real Deriv MT5 or Deriv X account.';
const mt5_eu =
'You are limited to one fiat account. You won’t be able to change your account currency if you have already made your first deposit or created a real CFDs account.';
"Enjoy a seamless trading experience with the selected fiat account. Please note that once you've made your first deposit or created a real CFDs account, your account currency cannot be changed.";
const mt5_non_eu =
'You are limited to one fiat account. You won’t be able to change your account currency if you have already made your first deposit or created a real Deriv MT5 account.';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,14 @@ const CurrencySelector = ({
/>
);
} else if (!is_dxtrade_allowed && is_mt5_allowed) {
if (is_eu) {
return (
<Localize
i18n_default_text="Enjoy a seamless trading experience with the selected fiat account. Please note that once you've made your first deposit or created a real {{dmt5_label}} account, your account currency cannot be changed."
values={{ dmt5_label }}
/>
);
}
return (
<Localize
i18n_default_text='You are limited to one fiat account. You won’t be able to change your account currency if you have already made your first deposit or created a real {{dmt5_label}} account.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
SourceOfWealth,
} from './financial-details-partials';
import { splitValidationResultTypes } from '../real-account-signup/helpers/utils';
import InlineNoteWithIcon from 'Components/inline-note-with-icon';

export type TFinancialDetails = {
goToPreviousStep: () => void;
Expand All @@ -42,6 +43,7 @@ export type TFinancialDetails = {
export type TFinancialInformationAndTradingExperience = {
shared_props?: object;
income_source_enum: object[];
is_eu_user?: boolean;
employment_status_enum: object[];
employment_industry_enum: object[];
occupation_enum: object[];
Expand Down Expand Up @@ -92,6 +94,8 @@ const FinancialDetails = (props: TFinancialDetails & TFinancialInformationAndTra
props.onCancel(current_step, props.goToPreviousStep);
};

const { is_eu_user } = props;

const handleValidate = (values: FormikValues) => {
const { errors } = splitValidationResultTypes(props.validate(values));
return errors;
Expand Down Expand Up @@ -131,9 +135,27 @@ const FinancialDetails = (props: TFinancialDetails & TFinancialInformationAndTra
height_offset='110px'
is_disabled={isDesktop()}
>
<Text as='p' color='prominent' size='xxs' className='trading-assessment__side-note'>
<Localize i18n_default_text='We collect information about your employment as part of our due diligence obligations, as required by anti-money laundering legislation.' />
</Text>
{is_eu_user && (
<div className='details-form__banner-container'>
<InlineNoteWithIcon
icon='IcAlertWarning'
message={localize(
'We collect information about your employment as part of our due diligence obligations, as required by anti-money laundering legislation.'
)}
title={localize('Why do we collect this?')}
/>
</div>
)}
{!is_eu_user && (
<Text
as='p'
color='prominent'
size='xxs'
className='trading-assessment__side-note'
>
<Localize i18n_default_text='We collect information about your employment as part of our due diligence obligations, as required by anti-money laundering legislation.' />
</Text>
)}
<ThemedScrollbars
autohide={!(window.innerHeight < 890)}
height={Number(height) - 77}
Expand Down
Loading