Skip to content

Commit

Permalink
[TRAH]/Hasan/TRAH-4439/Gold MT5 account creation flow (#17565)
Browse files Browse the repository at this point in the history
* feat: added gold account details to the mt5 account list

* feat: added gold icon

* feat: added new tag to gold card

* feat: added gold success icon

* feat: added multi action to gold

* feat: added gold icon in trade modal

* feat: added gold to transfer page

* feat: added gold title to trade modal

* feat: optimized svg accounts

* fix: bring back cfd_account_display function call

* feat: added mauritius tnc

* feat: added gold title to success message

* feat: added gold demo title to enter password title

* feat: added gold compare accounts

* feat: added gold demo compare accounts

* fix: build issue

* fix: build issue

* fix: removed console

* fix: fixed financial demo title

* fix: fixed financial title

* fix: changed description

* feat: added mt5 gold icon in close account modal

* fix: added shortcode in cfd constant

* fix: added shortcode in cfd constant

* fix: fixed investor password for gold account

* feat: fixed short code generation

* fix: made dml capital

* fix: made dml capital

* fix: removed gold from compare account

* fix: reset password for MF account

* fix: eu trade modal icon
  • Loading branch information
hasan-deriv authored Dec 6, 2024
1 parent dfd40d8 commit c75884c
Show file tree
Hide file tree
Showing 26 changed files with 182 additions and 55 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { Money } from '@deriv/components';
import { CFD_PLATFORMS, getCFDAccount, getCFDAccountDisplay, getCFDPlatformLabel, getMT5Icon } from '@deriv/shared';
import { FormatUtils, CurrencyConstants } from '@deriv-com/utils';
import { observer, useStore } from '@deriv/stores';
import { Localize } from '@deriv-com/translations';
import { CurrencyConstants, FormatUtils } from '@deriv-com/utils';

import { TCFDPlatform, TDetailsOfDerivXAccount, TDetailsOfMT5Account } from '../../../../Types';
import ClosingAccountPendingWrapper from './closing-account-pending-wrapper';

import ClosingAccountPendingContent from './closing-account-pending-content';
import ClosingAccountPendingWrapper from './closing-account-pending-wrapper';

type TClosingAccountPendingBalanceProps = {
platform: TCFDPlatform;
Expand Down Expand Up @@ -36,6 +38,7 @@ const ClosingAccountPendingBalance = observer(({ platform, account_balance }: TC
return `IcMt5-${getMT5Icon({
market_type: account.market_type,
is_eu: is_eu_user,
product: account.product,
})}`;
case CFD_PLATFORMS.DXTRADE:
return `IcDxtrade-${getCFDAccount({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const ClosingAccountPendingPositions = observer(
return `IcMt5-${getMT5Icon({
market_type: account.market_type,
is_eu: is_eu_user,
product: account.product,
})}`;
case CFD_PLATFORMS.DXTRADE:
return `IcDxtrade-${getCFDAccount({
Expand Down
14 changes: 7 additions & 7 deletions packages/account/src/Types/common.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export type TIDVFormValues = {
error_message?: string;
};

export type TPlatforms = typeof Platforms[keyof typeof Platforms];
export type TPlatforms = (typeof Platforms)[keyof typeof Platforms];

export type TServerError = {
code?: string;
Expand All @@ -172,7 +172,7 @@ export type TServerError = {
details?: { [key: string]: string };
fields?: string[];
};
export type TCFDPlatform = typeof CFD_PLATFORMS[keyof typeof CFD_PLATFORMS];
export type TCFDPlatform = (typeof CFD_PLATFORMS)[keyof typeof CFD_PLATFORMS];

export type TClosingAccountFormValues = {
'financial-priorities': boolean;
Expand Down Expand Up @@ -217,7 +217,7 @@ export type TAccounts = {
title?: string;
};

type TProduct = 'financial' | 'synthetic' | 'swap_free' | 'zero_spread' | 'cTrader' | 'derivx';
export type TProduct = 'financial' | 'synthetic' | 'swap_free' | 'zero_spread' | 'cTrader' | 'derivx' | 'gold';

type TPendingAccountDetails = {
balance?: number;
Expand Down Expand Up @@ -250,7 +250,7 @@ export type TAutoComplete = {
value: boolean;
text: string;
};
export type TPaymentMethodIdentifier = typeof IDENTIFIER_TYPES[keyof typeof IDENTIFIER_TYPES];
export type TPaymentMethodIdentifier = (typeof IDENTIFIER_TYPES)[keyof typeof IDENTIFIER_TYPES];

export type TPaymentMethodInfo = {
documents_required: number;
Expand Down Expand Up @@ -285,11 +285,11 @@ export type TProofOfOwnershipErrors = Record<

export type TFinancialInformationForm = Omit<SetFinancialAssessmentRequest, 'set_financial_assessment'>;

export type TAuthStatusCodes = typeof AUTH_STATUS_CODES[keyof typeof AUTH_STATUS_CODES];
export type TAuthStatusCodes = (typeof AUTH_STATUS_CODES)[keyof typeof AUTH_STATUS_CODES];

export type TMT5AccountStatus =
| typeof MT5_ACCOUNT_STATUS[keyof typeof MT5_ACCOUNT_STATUS]
| typeof TRADING_PLATFORM_STATUS[keyof typeof TRADING_PLATFORM_STATUS];
| (typeof MT5_ACCOUNT_STATUS)[keyof typeof MT5_ACCOUNT_STATUS]
| (typeof TRADING_PLATFORM_STATUS)[keyof typeof TRADING_PLATFORM_STATUS];

export type TFilesDescription = {
descriptions: { id: string; value: JSX.Element }[];
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions packages/appstore/src/assets/svgs/trading-platform/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import Options from 'Assets/svgs/trading-platform/ic-appstore-options.svg';
import SmartTraderBlue from 'Assets/svgs/trading-platform/ic-appstore-smarttrader-blue.svg';
import SwapFree from 'Assets/svgs/trading-platform/ic-appstore-swap-free.svg';
import ZeroSpread from 'Assets/svgs/trading-platform/ic-appstore-zero-spread.svg';
import Gold from 'Assets/svgs/trading-platform/ic-appstore-gold.svg';
import Demo from 'Assets/svgs/trading-platform/ic-brand-demo.svg';

import { IconProps } from '../icon-types';
Expand All @@ -42,6 +43,7 @@ export const PlatformIcons = {
SmartTraderBlue,
ZeroSpread,
Standard,
Gold,
};

const TradingPlatformIcon = ({ icon, className, size, onClick }: IconProps<keyof typeof PlatformIcons>) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ const TradingAppCard = ({
>
{name}
</Text>
{is_new && name === CFD_PRODUCTS_TITLE.ZEROSPREAD && (
{is_new && name === CFD_PRODUCTS_TITLE.GOLD && (
<Text className='trading-app-card__details__new' weight='bolder' size='xxs' line_height='s'>
<Localize i18n_default_text='NEW' />
</Text>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion packages/cashier/src/assets/svgs/trading-platform/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import React from 'react';

import CFDs from './ic-appstore-cfds.svg';
import Derived from './ic-appstore-derived.svg';
import Financial from './ic-appstore-financial.svg';
import Gold from './ic-appstore-gold.svg';
import Options from './ic-appstore-options.svg';
import CFDs from './ic-appstore-cfds.svg';
import Standard from './ic-appstore-standard.svg';
import SwapFree from './ic-appstore-swap-free.svg';
import ZeroSpread from './ic-appstore-zero-spread.svg';
Expand All @@ -22,6 +24,7 @@ export const PlatformIcons = {
Standard,
SwapFree,
ZeroSpread,
Gold,
};

const TradingPlatformIcon = ({ icon, className, size, onClick }: IconProps<keyof typeof PlatformIcons>) => {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion packages/cfd/src/Assets/svgs/trading-platform/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import CTrader from './ic-appstore-ctrader.svg';
import DerivX from './ic-appstore-deriv-x.svg';
import Derived from './ic-appstore-derived.svg';
import Financial from './ic-appstore-financial.svg';
import Gold from './ic-appstore-gold.svg';
import Standard from './ic-appstore-standard.svg';
import SwapFree from './ic-appstore-swap-free.svg';
import ZeroSpread from './ic-appstore-zero-spread.svg';
import Standard from './ic-appstore-standard.svg';

export interface IconProps<T> {
icon: T;
Expand All @@ -25,6 +26,7 @@ export const PlatformIcons = {
DerivX,
ZeroSpread,
Standard,
Gold,
};

const TradingPlatformIcon = ({ icon, className, size, onClick }: IconProps<keyof typeof PlatformIcons>) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/cfd/src/Components/props.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export type TCFDPlatform = 'dxtrade' | 'mt5' | 'ctrader';

export type TCFDsPlatformType = 'dxtrade' | 'mt5' | 'ctrader' | '';

export type TProducts = 'swap_free' | 'zero_spread' | 'ctrader' | 'derivx' | 'financial' | 'standard' | 'stp';
export type TProducts = 'swap_free' | 'zero_spread' | 'ctrader' | 'derivx' | 'financial' | 'standard' | 'stp' | 'gold';

export type TShortcode = DetailsOfEachMT5Loginid['landing_company_short'];

Expand Down
Loading

0 comments on commit c75884c

Please sign in to comment.