Skip to content

Commit

Permalink
[TRAH] Sergei / TRAH - 3857 / Hide Binary Bot from Traders Hub/Wallets (
Browse files Browse the repository at this point in the history
binary-com#16391)

* feat: remove binary bot from deriv app

* fix: finally remove binary type from wallets

* fix: change text in unit test
  • Loading branch information
sergei-deriv committed Aug 27, 2024
1 parent 3dec78b commit 3a2ab81
Show file tree
Hide file tree
Showing 36 changed files with 14 additions and 167 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('<SelfExclusionArticle />', () => {
const eu_item =
/these trading limits and self-exclusion help you control the amount of money and time you spend on deriv.com and exercise/i;
const non_eu_item =
/these self-exclusion limits help you control the amount of money and time you spend trading on deriv trader, deriv bot, smarttrader and binary bot on deriv. the limits you set here will help you exercise/i;
/these self-exclusion limits help you control the amount of money and time you spend trading on deriv trader, deriv bot and smarttrader on deriv. the limits you set here will help you exercise/i;

beforeEach(() => {
mock_self_exclusion_context = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ const SelfExclusionArticle = observer(() => {
/>
) : (
<Localize
i18n_default_text='These self-exclusion limits help you control the amount of money and time you spend trading on {{platform_name_trader}}, {{platform_name_dbot}}, {{platform_name_smarttrader}} and {{platform_name_bbot}} on Deriv. The limits you set here will help you exercise <0>responsible trading</0>.'
i18n_default_text='These self-exclusion limits help you control the amount of money and time you spend trading on {{platform_name_trader}}, {{platform_name_dbot}} and {{platform_name_smarttrader}} on Deriv. The limits you set here will help you exercise <0>responsible trading</0>.'
components={[<StaticUrl key={0} className='link' href='/responsible' />]}
values={{
platform_name_trader: getPlatformSettings('trader').name,
platform_name_dbot: getPlatformSettings('dbot').name,
platform_name_smarttrader: getPlatformSettings('smarttrader').name,
platform_name_bbot: getPlatformSettings('bbot').name,
}}
/>
),
Expand Down

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions packages/appstore/src/assets/svgs/trading-platform/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';

import BinaryBot from 'Assets/svgs/trading-platform/branding/ic-branding-binarybot-dashboard.svg';
import CTrader from 'Assets/svgs/trading-platform/branding/ic-branding-ctrader.svg';
import DBot from 'Assets/svgs/trading-platform/branding/ic-branding-dbot-dashboard.svg';
import DerivLogo from 'Assets/svgs/trading-platform/branding/ic-branding-deriv-logo.svg';
Expand All @@ -13,7 +12,6 @@ import Financial from 'Assets/svgs/trading-platform/branding/ic-branding-mt5-fin
import SmartTrader from 'Assets/svgs/trading-platform/branding/ic-branding-smarttrader-dashboard.svg';
import Standard from 'Assets/svgs/trading-platform/branding/ic-branding-standard-dashboard.svg';
import DropDown from 'Assets/svgs/trading-platform/drop-down.svg';
import BinaryBotBlue from 'Assets/svgs/trading-platform/ic-appstore-binarybot-blue.svg';
import DerivTradingLogo from 'Assets/svgs/trading-platform/ic-appstore-deriv-trading-logo.svg';
import DerivGoBlack from 'Assets/svgs/trading-platform/ic-appstore-derivgo-black.svg';
import Options from 'Assets/svgs/trading-platform/ic-appstore-options.svg';
Expand All @@ -25,8 +23,6 @@ import Demo from 'Assets/svgs/trading-platform/ic-brand-demo.svg';
import { IconProps } from '../icon-types';

export const PlatformIcons = {
BinaryBot,
BinaryBotBlue,
CFDs,
CTrader,
DBot,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {
ContentFlag,
getStaticUrl,
getUrlSmartTrader,
getUrlBinaryBot,
MT5_ACCOUNT_STATUS,
CFD_PRODUCTS_TITLE,
TRADING_PLATFORM_STATUS,
Expand Down Expand Up @@ -119,9 +118,6 @@ const TradingAppCard = ({
case DERIV_PLATFORM_NAMES.SMARTTRADER:
window.open(getUrlSmartTrader());
break;
case DERIV_PLATFORM_NAMES.BBOT:
window.open(getUrlBinaryBot());
break;
case DERIV_PLATFORM_NAMES.GO:
window.open(getStaticUrl('/deriv-go'));
break;
Expand Down
9 changes: 1 addition & 8 deletions packages/appstore/src/constants/platform-config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getUrlBinaryBot, getUrlSmartTrader, getPlatformSettingsAppstore, routes, getStaticUrl } from '@deriv/shared';
import { getUrlSmartTrader, getPlatformSettingsAppstore, routes, getStaticUrl } from '@deriv/shared';
import { localize } from '@deriv/translations';
import { PlatformIcons } from 'Assets/svgs/trading-platform';
import { TAccountCategory, TRegionAvailability } from 'Types';
Expand Down Expand Up @@ -49,12 +49,6 @@ export const getAppstorePlatforms = (): PlatformConfig[] => [
link_to: getUrlSmartTrader(),
is_external: true,
},
{
name: getPlatformSettingsAppstore('bbot').name,
app_desc: localize('The legacy bot trading platform.'),
link_to: getUrlBinaryBot(),
is_external: true,
},
{
name: getPlatformSettingsAppstore('go').name,
app_desc: localize('The mobile app for trading multipliers and accumulators.'),
Expand All @@ -79,6 +73,5 @@ export const DERIV_PLATFORM_NAMES = {
TRADER: 'Deriv Trader',
DBOT: 'Deriv Bot',
SMARTTRADER: 'SmartTrader',
BBOT: 'Binary Bot',
GO: 'Deriv GO',
} as const;
4 changes: 1 addition & 3 deletions packages/appstore/src/types/common.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export type RequiredAndNotNull<T> = {

export type TRegionAvailability = 'Non-EU' | 'EU' | 'All';
export type TAccountCategory = 'real' | 'demo';
export type TPlatform = 'dxtrade' | 'mt5' | 'trader' | 'dbot' | 'smarttrader' | 'bbot' | 'go' | 'ctrader';
export type TPlatform = 'dxtrade' | 'mt5' | 'trader' | 'dbot' | 'smarttrader' | 'go' | 'ctrader';

export type TBrandData = {
name: string;
Expand Down Expand Up @@ -109,8 +109,6 @@ export type TStaticAccountProps = {
export type TIconTypes =
| 'Standard'
| 'Financial'
| 'BinaryBot'
| 'BinaryBotBlue'
| 'DBot'
| 'Demo'
| 'DerivGo'
Expand Down

This file was deleted.

2 changes: 0 additions & 2 deletions packages/core/src/App/AppContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { useDevice } from '@deriv-com/ui';
import { useIsMounted } from '@deriv/shared';
import { observer, useStore } from '@deriv/stores';
import { browserSupportsWebAuthn } from '@simplewebauthn/browser';
import BinaryBotIFrame from 'Modules/BinaryBotIFrame';
import P2PIFrame from 'Modules/P2PIFrame';
import SmartTraderIFrame from 'Modules/SmartTraderIFrame';
import ErrorBoundary from './Components/Elements/Errors/error-boundary.jsx';
Expand Down Expand Up @@ -82,7 +81,6 @@ const AppContent: React.FC<{ passthrough: unknown }> = observer(({ passthrough }
<AppModals />
</ErrorBoundary>
<SmartTraderIFrame />
<BinaryBotIFrame />
<P2PIFrame />
<AppToastMessages />
<Devtools />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'Sass/app/_common/components/platform-switcher.scss';

import { Icon } from '@deriv/components';
import { getPlatformInformation, getUrlBinaryBot, isMobile } from '@deriv/shared';
import { getPlatformInformation, isMobile } from '@deriv/shared';

import { CSSTransition } from 'react-transition-group';
import { PlatformDropdown } from './platform-dropdown.jsx';
Expand All @@ -25,15 +25,6 @@ const PlatformSwitcher = ({

const is_close_drawer_fired_ref = React.useRef(false);

React.useEffect(() => {
platform_config.forEach(data => {
const { name } = data;
if (name === 'Binary Bot') {
data.href = getUrlBinaryBot();
}
});
}, [current_language, platform_config]);

React.useEffect(() => {
if (is_close_drawer_fired_ref.current) {
if (typeof toggleDrawer === 'function') {
Expand Down
Loading

0 comments on commit 3a2ab81

Please sign in to comment.