Skip to content

Commit

Permalink
chore: removed tradershub v2 package and ci checks (#15437)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzaib-deriv authored Jun 12, 2024
1 parent 020120d commit 5a6e3f8
Show file tree
Hide file tree
Showing 405 changed files with 2 additions and 13,645 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,10 @@ jobs:
run: npx tsc --project packages/stores/tsconfig.json -noEmit
- name: Check TypeScript for @deriv/wallets
run: npx tsc --project packages/wallets/tsconfig.json -noEmit
- name: Check TypeScript for @deriv/tradershub
run: npx tsc --project packages/tradershub/tsconfig.json -noEmit
- name: Check TypeScript for @deriv/cashier-v2
run: npx tsc --project packages/cashier-v2/tsconfig.json -noEmit
- name: Check ESLint for @deriv/wallets
run: npx eslint --fix --ignore-path packages/wallets/.eslintignore --config packages/wallets/.eslintrc.js packages/wallets
- name: Check ESLint for @deriv/tradershub
run: npx eslint --fix --ignore-path packages/tradershub/.eslintignore --config packages/tradershub/.eslintrc.js packages/tradershub
- name: Check ESLint for @deriv/cashier-v2
run: npx eslint --fix --ignore-path packages/cashier-v2/.eslintignore --config packages/cashier-v2/.eslintrc.js packages/cashier-v2
- name: Check Stylelint for @deriv/wallets
Expand Down
4 changes: 0 additions & 4 deletions packages/core/build/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@ const copyConfig = base => {
from: path.resolve(__dirname, '../node_modules/@deriv/p2p-v2/dist/p2p-v2'),
to: 'p2p-v2',
},
{
from: path.resolve(__dirname, '../node_modules/@deriv/tradershub/dist/tradershub'),
to: 'tradershub',
},
{
from: path.resolve(__dirname, '../node_modules/@deriv/cashier-v2/dist/cashier-v2'),
to: 'cashier-v2',
Expand Down
1 change: 0 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@
"@deriv/shared": "^1.0.0",
"@deriv/stores": "^1.0.0",
"@deriv/trader": "^3.8.0",
"@deriv/tradershub": "^1.0.0",
"@deriv/translations": "^1.0.0",
"@deriv/utils": "^1.0.0",
"@deriv/wallets": "^1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useFeatureFlags } from '@deriv/hooks';
const RouteWithSubRoutes = observer(route => {
const { common } = useStore();

const { is_next_cashier_enabled, is_next_tradershub_enabled } = useFeatureFlags();
const { is_next_cashier_enabled } = useFeatureFlags();
const { checkAppId } = common;
const validateRoute = pathname => {
if (pathname.startsWith('/cashier') && !pathname.includes('p2p') && !!route.routes) {
Expand All @@ -24,11 +24,6 @@ const RouteWithSubRoutes = observer(route => {
return route.path === pathname || !!p2p_subroutes;
} else if (pathname.includes(routes.cashier_v2) && !is_next_cashier_enabled) {
return false;
} else if (
(pathname === routes.traders_hub_v2 || pathname === routes.compare_accounts) &&
!is_next_tradershub_enabled
) {
return false;
}
return true;
};
Expand Down
13 changes: 0 additions & 13 deletions packages/core/src/App/Constants/routes-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ const Bot = React.lazy(() =>
})
);

const TradersHub = React.lazy(() =>
moduleLoader(() => {
// eslint-disable-next-line import/no-unresolved
return import(/* webpackChunkName: "tradershub" */ '@deriv/tradershub');
})
);

const P2P = React.lazy(() =>
moduleLoader(() => {
// eslint-disable-next-line import/no-unresolved
Expand Down Expand Up @@ -273,12 +266,6 @@ const getModules = () => {
getTitle: () => localize('P2P-V2'),
is_authenticated: true,
},
{
path: routes.traders_hub_v2,
component: TradersHub,
is_authenticated: true,
getTitle: () => localize('Trader’s Hub V2'),
},
{
path: routes.cashier_v2,
component: Cashier_V2,
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/App/Containers/Layout/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,9 @@ const Header = observer(() => {
const traders_hub_routes =
[
routes.traders_hub,
routes.traders_hub_v2,
routes.account,
routes.cashier,
routes.wallets_compare_accounts,
routes.compare_accounts,
routes.compare_cfds,
].includes(pathname) ||
pathname.startsWith(routes.compare_cfds) ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import { useHistory, useLocation } from 'react-router';
import classNames from 'classnames';
import { Icon, Text } from '@deriv/components';
import { useFeatureFlags } from '@deriv/hooks';
import { routes } from '@deriv/shared';
import { observer, useStore } from '@deriv/stores';
import { Localize } from '@deriv/translations';
Expand All @@ -13,25 +12,17 @@ const TradersHubHomeButton = observer(() => {
const history = useHistory();
const location = useLocation();
const { pathname } = location;
const { is_next_tradershub_enabled } = useFeatureFlags();

const TradersHubIcon = is_dark_mode_on ? 'IcAppstoreHomeDark' : 'IcAppstoreTradersHubHomeUpdated';

const redirectRoutes = () => {
if (is_next_tradershub_enabled) {
return routes.traders_hub_v2;
}
return routes.traders_hub;
};

return (
<div
data-testid='dt_traders_hub_home_button'
className={classNames('traders-hub-header__tradershub', {
'traders-hub-header__tradershub--active':
pathname === routes.traders_hub || pathname === routes.traders_hub_v2,
})}
onClick={() => history.push(redirectRoutes())}
onClick={() => history.push(routes.traders_hub)}
>
<div className='traders-hub-header__tradershub--home-logo'>
<Icon icon={TradersHubIcon} size={is_dark_mode_on ? 15 : 17} />
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/root_files/robots.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ Disallow: */account/*
Disallow: */cashier-v2/*
Disallow: */p2p-v2/*
Disallow: */endpoint*
Disallow: */tradershub/*
4 changes: 0 additions & 4 deletions packages/shared/src/utils/routes/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,6 @@ export const routes = {
wallets_on_ramp: '/wallet/on-ramp',
wallets_reset_balance: '/wallet/reset-balance',

// Traders Hub
traders_hub_v2: '/traders-hub',
compare_accounts: '/traders-hub/compare-accounts',

// Cashier V2
cashier_v2: '/cashier-v2',
};
1 change: 0 additions & 1 deletion packages/stores/src/stores/FeatureFlagsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import BaseStore from './BaseStore';
const FLAGS = {
dtrader_v2: false,
next_cashier: false,
next_tradershub: false,
p2p_v2: false,
sharkfin: false,
wallet: false,
Expand Down
2 changes: 0 additions & 2 deletions packages/tradershub/.eslintignore

This file was deleted.

65 changes: 0 additions & 65 deletions packages/tradershub/.eslintrc.js

This file was deleted.

16 changes: 0 additions & 16 deletions packages/tradershub/babel.config.json

This file was deleted.

6 changes: 0 additions & 6 deletions packages/tradershub/declarations.d.ts

This file was deleted.

16 changes: 0 additions & 16 deletions packages/tradershub/jest.config.js

This file was deleted.

57 changes: 0 additions & 57 deletions packages/tradershub/package.json

This file was deleted.

6 changes: 0 additions & 6 deletions packages/tradershub/postcss.config.js

This file was deleted.

23 changes: 0 additions & 23 deletions packages/tradershub/src/App.tsx

This file was deleted.

13 changes: 0 additions & 13 deletions packages/tradershub/src/AppContent.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions packages/tradershub/src/assets/cfd/ctrader-success.svg

This file was deleted.

1 change: 0 additions & 1 deletion packages/tradershub/src/assets/cfd/dxtrade-password.svg

This file was deleted.

Loading

0 comments on commit 5a6e3f8

Please sign in to comment.