Skip to content

Commit

Permalink
Revert "chore: add alpha generation guide to mt5 except gold (#17976)" (
Browse files Browse the repository at this point in the history
#17981)

This reverts commit ba48580.
  • Loading branch information
vinu-deriv authored Jan 15, 2025
1 parent ba48580 commit a836efc
Show file tree
Hide file tree
Showing 13 changed files with 4 additions and 198 deletions.
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/cfd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
"@deriv-com/ui": "1.36.4",
"@deriv-com/analytics": "1.28.2",
"@deriv-com/translations": "1.3.9",
"@deriv/quill-icons": "2.2.1",
"@deriv-com/utils": "^0.0.42",
"@deriv/account": "^1.0.0",
"@deriv/api": "^1.0.0",
Expand Down
23 changes: 0 additions & 23 deletions packages/cfd/src/Containers/__tests__/dmt5-trade-modal.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,27 +154,4 @@ describe('<DMT5TradeModal/>', () => {
renderComponent({ props: new_mock_props });
expect(screen.queryByText(/MockMigrateBanner/)).toBeInTheDocument();
});

it('should render information banner for non-gold account', () => {
const new_mock_props = {
...mock_props,
mt5_trade_account: {
product: 'svg',
},
};
renderComponent({ props: new_mock_props });
expect(screen.getByText(/Alpha Generation guide/)).toBeInTheDocument();
expect(screen.getByText(/Tailor your indicators with expert-driven trend analysis./)).toBeInTheDocument();
});

it('should not render information banner for gold account', () => {
const new_mock_props = {
...mock_props,
mt5_trade_account: {
product: 'gold',
},
};
renderComponent({ props: new_mock_props });
expect(screen.queryByText(/Alpha Generation guide/)).not.toBeInTheDocument();
});
});
14 changes: 1 addition & 13 deletions packages/cfd/src/Containers/dmt5-trade-modal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { TAdditionalDetailsOfEachMT5Loginid } from '@deriv/stores/types';
import { useDevice } from '@deriv-com/ui';
import { Text, Icon, Money, StatusBadge, InformationBanner } from '@deriv/components';
import { Text, Icon, Money, StatusBadge } from '@deriv/components';
import getMT5StatusBadgeConfig from '@deriv/account/src/Configs/get-mt5-status-badge-config';
import { getCFDAccountKey, MT5_ACCOUNT_STATUS, PRODUCT, Jurisdiction } from '@deriv/shared';
import { observer, useStore } from '@deriv/stores';
Expand All @@ -15,7 +15,6 @@ import PasswordBox from '../Components/passwordbox';
import SpecBox from '../Components/specbox';
import { TCFDPasswordReset } from './props.types';
import { TProducts, TTradingPlatformAccounts } from '../Components/props.types';
import { StandaloneChartAreaRegularIcon, StandaloneArrowUpRightRegularIcon } from '@deriv/quill-icons';

type TMT5TradeModalProps = {
mt5_trade_account: TAdditionalDetailsOfEachMT5Loginid;
Expand Down Expand Up @@ -208,17 +207,6 @@ const DMT5TradeModal = observer(
<Localize i18n_default_text='Server maintenance starts at 01:00 GMT every Sunday, and this process may take up to 2 hours to complete. Service may be disrupted during this time.' />
</div>
</div>
{isDesktop && mt5_trade_account.product !== PRODUCT.GOLD && (
<InformationBanner
information_icon={<StandaloneChartAreaRegularIcon fill='#095A66' iconSize='sm' />}
title={<Localize i18n_default_text='Alpha Generation guide' />}
description={
<Localize i18n_default_text='Tailor your indicators with expert-driven trend analysis.' />
}
redirect_icon={<StandaloneArrowUpRightRegularIcon fill='#000000' iconSize='sm' />}
link='https://docs.deriv.com/misc/alpha_generation_guide.pdf'
/>
)}
</div>
{is_eligible_to_migrate && <MigrationBanner is_trade_modal />}

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion packages/components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ export { default as UnhandledErrorModal } from './components/unhandled-error-mod
export { default as VerticalTab } from './components/vertical-tab';
export { default as Wizard } from './components/wizard';
export { default as VideoPlayer } from './components/video-player';
export { default as InformationBanner } from './components/information-banner';
export * from './components/wallet-card';
export * from './components/wallet-icon';
export * from './components/app-linked-with-wallet-icon';
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion packages/wallets/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export * from './FadedAnimatedList';
export * from './FlowProvider';
export * from './FormDropdown';
export * from './FormField';
export * from './InformationBanner';
export * from './OptionsAndMultipliersListing';
export * from './SentEmailContent';
export * from './SkeletonLoader';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
import React, { FC, Fragment, useMemo } from 'react';
import { useHistory } from 'react-router-dom';
import { useActiveWalletAccount, useCtraderAccountsList, useDxtradeAccountsList, useIsEuRegion } from '@deriv/api-v2';
import {
LabelPairedArrowUpArrowDownMdBoldIcon,
LabelPairedCircleExclamationMdFillIcon,
StandaloneArrowUpRightRegularIcon,
StandaloneChartAreaRegularIcon,
} from '@deriv/quill-icons';
import { LabelPairedArrowUpArrowDownMdBoldIcon, LabelPairedCircleExclamationMdFillIcon } from '@deriv/quill-icons';
import { Localize, useTranslations } from '@deriv-com/translations';
import { Button, InlineMessage, Text, useDevice } from '@deriv-com/ui';
import { InformationBanner, WalletBadge, WalletListCardBadge } from '../../../../components';
import { WalletBadge, WalletListCardBadge } from '../../../../components';
import { useModal } from '../../../../components/ModalProvider';
import { TAddedMT5Account, THooks } from '../../../../types';
import {
CFD_PLATFORMS,
getMarketTypeDetails,
getServiceMaintenanceMessages,
PlatformDetails,
PRODUCT,
} from '../../constants';
import { CFD_PLATFORMS, getMarketTypeDetails, getServiceMaintenanceMessages, PlatformDetails } from '../../constants';
import MT5DesktopRedirectOption from './MT5TradeLink/MT5DesktopRedirectOption';
import MT5MobileRedirectOption from './MT5TradeLink/MT5MobileRedirectOption';
import { MT5TradeDetailsItem } from './MT5TradeDetailsItem';
Expand Down Expand Up @@ -236,18 +225,6 @@ const MT5TradeScreen: FC<MT5TradeScreenProps> = ({ mt5Account }) => {
}
</Text>
</div>

{isDesktop && details?.platform === mt5Platform && marketTypeTitle.toLowerCase() !== PRODUCT.GOLD && (
<InformationBanner
description={
<Localize i18n_default_text='Tailor your indicators with expert-driven trend analysis.' />
}
informationIcon={<StandaloneChartAreaRegularIcon fill='#095A66' iconSize='sm' />}
link='https://docs.deriv.com/misc/alpha_generation_guide.pdf'
redirectIcon={<StandaloneArrowUpRightRegularIcon fill='#000000' iconSize='sm' />}
title={<Localize i18n_default_text='Alpha Generation guide' />}
/>
)}
</div>
<div className='wallets-mt5-trade-screen__links'>
{platform === mt5Platform && (
Expand Down

0 comments on commit a836efc

Please sign in to comment.