diff --git a/packages/core/src/App/Containers/Redirect/redirect.jsx b/packages/core/src/App/Containers/Redirect/redirect.jsx
index e5b6fe4dcb0d..c44ccef4b683 100644
--- a/packages/core/src/App/Containers/Redirect/redirect.jsx
+++ b/packages/core/src/App/Containers/Redirect/redirect.jsx
@@ -31,7 +31,7 @@ const Redirect = observer(() => {
const ext_platform_url = url_params.get('ext_platform_url');
const redirectToExternalPlatform = url => {
- history.push(`${routes.root}?ext_platform_url=${url}`);
+ history.push(`${routes.traders_hub}?ext_platform_url=${url}`);
redirected_to_route = true;
};
setVerificationCode(code_param, action_param);
@@ -94,28 +94,19 @@ const Redirect = observer(() => {
if (redirect_to) {
let pathname = '';
let hash = '';
- const main_screen_route = has_wallet ? routes.wallets : routes.traders_hub;
switch (redirect_to) {
case '1':
- pathname = routes.traders_hub;
- break;
- case '10':
- pathname = main_screen_route;
- hash = 'real';
- break;
- case '11':
- pathname = main_screen_route;
- hash = 'demo';
- break;
case '2':
pathname = routes.traders_hub;
break;
+ case '10':
case '20':
- pathname = main_screen_route;
+ pathname = routes.traders_hub;
hash = 'real';
break;
+ case '11':
case '21':
- pathname = main_screen_route;
+ pathname = routes.traders_hub;
hash = 'demo';
break;
case '3':
@@ -231,7 +222,7 @@ const Redirect = observer(() => {
const is_demo = localStorage.getItem('cfd_reset_password_intent')?.includes('demo');
if (has_wallet) {
history.push({
- pathname: routes.wallets,
+ pathname: routes.traders_hub,
search: url_query_string,
});
} else {
@@ -253,9 +244,9 @@ const Redirect = observer(() => {
break;
}
- if (!redirected_to_route && history.location.pathname !== routes.root) {
+ if (!redirected_to_route && history.location.pathname !== routes.traders_hub) {
history.push({
- pathname: routes.root,
+ pathname: routes.traders_hub,
search: url_query_string,
});
}
diff --git a/packages/core/src/App/Containers/RootComponent/index.js b/packages/core/src/App/Containers/RootComponent/index.js
new file mode 100644
index 000000000000..d807a1fc3997
--- /dev/null
+++ b/packages/core/src/App/Containers/RootComponent/index.js
@@ -0,0 +1,3 @@
+import RootComponent from './root-component.jsx';
+
+export default RootComponent;
diff --git a/packages/core/src/App/Containers/RootComponent/root-component.jsx b/packages/core/src/App/Containers/RootComponent/root-component.jsx
new file mode 100644
index 000000000000..8a46dac2ed87
--- /dev/null
+++ b/packages/core/src/App/Containers/RootComponent/root-component.jsx
@@ -0,0 +1,26 @@
+import React from 'react';
+import { moduleLoader } from '@deriv/shared';
+import { observer, useStore } from '@deriv/stores';
+
+const AppStore = React.lazy(() =>
+ moduleLoader(() => {
+ // eslint-disable-next-line import/no-unresolved
+ return import(/* webpackChunkName: "appstore" */ '@deriv/appstore');
+ })
+);
+
+const Wallets = React.lazy(() =>
+ moduleLoader(() => {
+ // eslint-disable-next-line import/no-unresolved
+ return import(/* webpackChunkName: "wallets" */ '@deriv/wallets');
+ })
+);
+
+const RootComponent = observer(props => {
+ const { client } = useStore();
+ const { has_wallet } = client;
+
+ return has_wallet ?
:
;
+});
+
+export default RootComponent;
diff --git a/packages/core/src/Stores/client-store.js b/packages/core/src/Stores/client-store.js
index 50ed7395f7a9..34496e1dccf1 100644
--- a/packages/core/src/Stores/client-store.js
+++ b/packages/core/src/Stores/client-store.js
@@ -1459,6 +1459,11 @@ export default class ClientStore extends BaseStore {
'_filteredParams',
];
+ // redirect to the DTrader of there is needed query params
+ if (!window.location.pathname.endsWith(routes.trade) && /chart_type|interval|symbol|trade_type/.test(search)) {
+ window.history.replaceState({}, document.title, routes.trade + search);
+ }
+
const authorize_response = await this.setUserLogin(login_new_user);
if (action_param === 'signup') {
@@ -1859,7 +1864,7 @@ export default class ClientStore extends BaseStore {
}
//temporary workaround to sync this.loginid with selected wallet loginid
- if (window.location.pathname.includes(routes.wallets_cashier)) {
+ if (window.location.pathname.includes(routes.wallets)) {
this.resetLocalStorageValues(localStorage.getItem('active_loginid') ?? this.loginid);
return;
}
@@ -2104,10 +2109,10 @@ export default class ClientStore extends BaseStore {
const redirect_url = sessionStorage.getItem('redirect_url');
- const target_url = this.has_wallet ? routes.wallets : routes.traders_hub;
+ const target_url = routes.traders_hub;
if (
- (redirect_url?.endsWith('/') ||
+ (redirect_url?.endsWith(routes.trade) ||
redirect_url?.endsWith(routes.bot) ||
/chart_type|interval|symbol|trade_type/.test(redirect_url)) &&
(isTestLink() || isProduction() || isLocal() || isStaging() || isTestDerivApp())
diff --git a/packages/core/src/sass/app/_common/layout/header.scss b/packages/core/src/sass/app/_common/layout/header.scss
index 22fd79bbc7b1..6ad9064e63df 100644
--- a/packages/core/src/sass/app/_common/layout/header.scss
+++ b/packages/core/src/sass/app/_common/layout/header.scss
@@ -381,6 +381,17 @@
height: #{$MOBILE_HEADER_HEIGHT - 1px};
}
}
+
+ &__divider {
+ width: 0.1rem;
+ height: 3rem;
+ margin-left: 0.8rem;
+ background: var(--general-section-2);
+
+ @include mobile {
+ height: 2.4rem;
+ }
+ }
}
.header-v2 {
diff --git a/packages/reports/src/Components/Elements/Modals/ServicesErrorModal/__tests__/insufficient-balance-modal.spec.tsx b/packages/reports/src/Components/Elements/Modals/ServicesErrorModal/__tests__/insufficient-balance-modal.spec.tsx
index fe4cdde3c975..9db5a1c8c48b 100644
--- a/packages/reports/src/Components/Elements/Modals/ServicesErrorModal/__tests__/insufficient-balance-modal.spec.tsx
+++ b/packages/reports/src/Components/Elements/Modals/ServicesErrorModal/__tests__/insufficient-balance-modal.spec.tsx
@@ -3,6 +3,7 @@ import { screen, render } from '@testing-library/react';
import InsufficientBalanceModal from '../insufficient-balance-modal';
import { createBrowserHistory } from 'history';
import { Router } from 'react-router-dom';
+import { StoreProvider, mockStore } from '@deriv/stores';
import { routes } from '@deriv/shared';
import userEvent from '@testing-library/user-event';
@@ -19,16 +20,6 @@ type TModal = React.FC<{
}>;
};
-jest.mock('@deriv/stores', () => ({
- ...jest.requireActual('@deriv/stores'),
- observer: jest.fn(x => x),
- useStore: jest.fn(() => ({
- ui: {
- is_mobile: false,
- },
- })),
-}));
-
jest.mock('@deriv/components', () => {
const original_module = jest.requireActual('@deriv/components');
const Modal: TModal = jest.fn(({ children, is_open, title }) => {
@@ -58,35 +49,51 @@ describe('
', () => {
message: 'test',
toggleModal: jest.fn(),
};
+ let mock_store: ReturnType
;
+
+ beforeEach(() => {
+ mock_store = mockStore({
+ client: { has_wallet: false },
+ ui: {
+ is_mobile: false,
+ },
+ });
+ });
const history = createBrowserHistory();
- const renderWithRouter = (component: React.ReactElement) => {
- return render({component});
+
+ const wrapper = ({ children }: { children: React.ReactNode }) => {
+ return (
+
+ {children}
+
+ );
};
it('modal title, and modal description should be rendered', () => {
- renderWithRouter();
+ render(, { wrapper });
expect(screen.getByText(/insufficient balance/i)).toBeInTheDocument();
expect(screen.getByText(/test/i)).toBeInTheDocument();
});
it('button text should be OK if is_virtual is true and toggleModal should be called if user clicks on the button', () => {
- renderWithRouter();
+ render(, { wrapper });
const button = screen.getByText(/ok/i);
expect(button).toBeInTheDocument();
userEvent.click(button);
expect(mocked_props.toggleModal).toHaveBeenCalled();
});
- it('button text should be "Deposit now" if is_virtual is false and should navigate to bla bla if you click on the button', () => {
+ it('button text should be "Deposit now" if is_virtual is false and should navigate to wallets overlay deposit tab if client has CRW account and click on the button', () => {
mocked_props.is_virtual = false;
- renderWithRouter();
+ mock_store.client.has_wallet = true;
+ render(, { wrapper });
const button = screen.getByText(/deposit now/i);
expect(button).toBeInTheDocument();
userEvent.click(button);
- expect(history.location.pathname).toBe(routes.cashier_deposit);
+ expect(history.location.pathname).toBe(routes.wallets_deposit);
});
it('should return null when is_visible is false', () => {
mocked_props.is_visible = false;
- const { container } = renderWithRouter();
+ const { container } = render(, { wrapper });
expect(container).toBeEmptyDOMElement();
});
});
diff --git a/packages/reports/src/Components/Elements/Modals/ServicesErrorModal/insufficient-balance-modal.tsx b/packages/reports/src/Components/Elements/Modals/ServicesErrorModal/insufficient-balance-modal.tsx
index 349ec805ad09..613a80d9c015 100644
--- a/packages/reports/src/Components/Elements/Modals/ServicesErrorModal/insufficient-balance-modal.tsx
+++ b/packages/reports/src/Components/Elements/Modals/ServicesErrorModal/insufficient-balance-modal.tsx
@@ -16,7 +16,9 @@ const InsufficientBalanceModal = observer(
({ history, is_virtual, is_visible, message, toggleModal }: TInsufficientBalanceModal) => {
const {
ui: { is_mobile },
+ client,
} = useStore();
+ const { has_wallet } = client;
return (
{
if (!is_virtual) {
- history?.push?.(routes.cashier_deposit);
+ history?.push?.(has_wallet ? routes.wallets_deposit : routes.cashier_deposit);
} else {
toggleModal();
}
diff --git a/packages/shared/src/styles/constants.scss b/packages/shared/src/styles/constants.scss
index 52ca4e6a001b..ec3511f71ada 100644
--- a/packages/shared/src/styles/constants.scss
+++ b/packages/shared/src/styles/constants.scss
@@ -58,6 +58,7 @@ $color-grey-11: #fafafa;
$color-grey-12: #f5f7fa;
$color-grey-13: #2e2e2e;
$color-grey-14: #e2e5e7;
+$color-grey-15: #f3f4f5;
$color-orange: #ff6444;
$color-purple: #722fe4;
$color-red: #ff444f;
diff --git a/packages/shared/src/styles/themes.scss b/packages/shared/src/styles/themes.scss
index dc70412f0f67..a9ca24b48b35 100644
--- a/packages/shared/src/styles/themes.scss
+++ b/packages/shared/src/styles/themes.scss
@@ -9,6 +9,7 @@
--text-size-xsm: 1.8rem;
--text-size-sm: 2rem;
--text-size-m: 2.4rem;
+ --text-size-xm: 2.8rem;
--text-size-l: 3.2rem;
--text-size-xl: 4.8rem;
--text-size-xxl: 6.4rem;
@@ -120,6 +121,7 @@
--button-toggle-primary: #{$color-blue-3};
--button-toggle-secondary: #{$color-grey-5};
--button-toggle-alternate: #{$color-white};
+ --button-get-started-bg: #{$color-black-7};
// Overlay
--overlay-outside-dialog: #{$alpha-color-black-1};
--overlay-inside-dialog: #{$alpha-color-white-1};
@@ -202,6 +204,7 @@
--badge-green: #{$color-green-3};
//TradersHub Banner
--traders-hub-banner-border-color: #{$color-grey-4};
+ --traders-hub-logged-out-banner-bg-color: #{$color-grey-15};
// wallets
--wallets-banner-ready-bg-color: #{$ready-banner-bg-color};
--wallets-banner-ready-tick-bg-color: #{$ready-banner-tick-bg-color};
@@ -262,6 +265,7 @@
--purchase-section-2: #{$color-red-3};
--purchase-disabled-main: #{$color-black-4};
--purchase-disabled-section: #{$color-black};
+ // Buttons
--button-primary-default: var(--brand-red-coral);
--button-secondary-default: #{$color-grey-7};
--button-tertiary-default: transparent;
@@ -273,6 +277,7 @@
--button-toggle-primary: #{$color-blue-3};
--button-toggle-secondary: #{$color-black-8};
--button-toggle-alternate: #{$color-black-8};
+ --button-get-started-bg: #{$color-white};
// Overlay
--overlay-outside-dialog: #{$alpha-color-black-1};
--overlay-inside-dialog: #{$alpha-color-black-2};
@@ -338,6 +343,7 @@
--badge-green: #{$color-green-3};
//TradersHub Banner
--traders-hub-banner-border-color: #{$color-black-5};
+ --traders-hub-logged-out-banner-bg-color: #{$color-black-5};
// wallets
--wallets-banner-ready-bg-color: #{$ready-banner-bg-color};
--wallets-banner-ready-tick-bg-color: #{$ready-banner-tick-bg-color};
diff --git a/packages/shared/src/utils/contract/__tests__/trade-url-params-config.spec.ts b/packages/shared/src/utils/contract/__tests__/trade-url-params-config.spec.ts
index 870c98345cea..2496d9ea8e42 100644
--- a/packages/shared/src/utils/contract/__tests__/trade-url-params-config.spec.ts
+++ b/packages/shared/src/utils/contract/__tests__/trade-url-params-config.spec.ts
@@ -39,7 +39,10 @@ describe('getTradeURLParams', () => {
Object.defineProperty(window, 'location', {
configurable: true,
enumerable: true,
- value: new URL('https://localhost:8443/'),
+ value: {
+ hostname: 'https://localhost:8443/',
+ pathname: routes.trade,
+ },
});
});
@@ -128,28 +131,40 @@ describe('setTradeURLParams', () => {
setTradeURLParams({
granularity: 0,
});
- expect(spyHistoryReplaceState).toBeCalledWith({}, document.title, `/?interval=${oneTickInterval}`);
+ expect(spyHistoryReplaceState).toBeCalledWith(
+ {},
+ document.title,
+ `${routes.trade}?interval=${oneTickInterval}`
+ );
});
it('should set chart_type query param into URL based on the received chart_type value', () => {
const spyHistoryReplaceState = jest.spyOn(window.history, 'replaceState');
setTradeURLParams({
chartType: areaChartType.value,
});
- expect(spyHistoryReplaceState).toBeCalledWith({}, document.title, `/?chart_type=${areaChartType.text}`);
+ expect(spyHistoryReplaceState).toBeCalledWith(
+ {},
+ document.title,
+ `${routes.trade}?chart_type=${areaChartType.text}`
+ );
});
it('should set symbol query param into URL based on the received symbol value', () => {
const spyHistoryReplaceState = jest.spyOn(window.history, 'replaceState');
setTradeURLParams({
symbol,
});
- expect(spyHistoryReplaceState).toBeCalledWith({}, document.title, `/?symbol=${symbol}`);
+ expect(spyHistoryReplaceState).toBeCalledWith({}, document.title, `${routes.trade}?symbol=${symbol}`);
});
it('should set trade_type query param into URL based on the received contract_type value', () => {
const spyHistoryReplaceState = jest.spyOn(window.history, 'replaceState');
setTradeURLParams({
contractType: TRADE_TYPES.ACCUMULATOR,
});
- expect(spyHistoryReplaceState).toBeCalledWith({}, document.title, `/?trade_type=${TRADE_TYPES.ACCUMULATOR}`);
+ expect(spyHistoryReplaceState).toBeCalledWith(
+ {},
+ document.title,
+ `${routes.trade}?trade_type=${TRADE_TYPES.ACCUMULATOR}`
+ );
});
it('should not set any query params into URL when called with empty object', () => {
const spyHistoryReplaceState = jest.spyOn(window.history, 'replaceState');
diff --git a/packages/shared/src/utils/routes/routes.ts b/packages/shared/src/utils/routes/routes.ts
index 628555cbbd65..79f97c039080 100644
--- a/packages/shared/src/utils/routes/routes.ts
+++ b/packages/shared/src/utils/routes/routes.ts
@@ -1,7 +1,23 @@
import { getUrlSmartTrader, getUrlBinaryBot } from '../url/helpers';
export const routes = {
+ reset_password: '/',
error404: '/404',
+ index: '/index',
+ redirect: '/redirect',
+ endpoint: '/endpoint',
+ complaints_policy: '/complaints-policy',
+ contract: '/contract/:contract_id',
+
+ // platforms
+ mt5: '/mt5',
+ dxtrade: '/derivx',
+ bot: '/bot',
+ trade: '/dtrader',
+ smarttrader: getUrlSmartTrader(),
+ binarybot: getUrlBinaryBot(),
+
+ // account
account: '/account',
trading_assessment: '/account/trading-assessment',
languages: '/account/languages',
@@ -22,29 +38,26 @@ export const routes = {
login_history: '/account/login-history',
two_factor_authentication: '/account/two-factor-authentication',
self_exclusion: '/account/self-exclusion',
+
+ // settings
+ settings: '/settings',
account_password: '/settings/account_password',
apps: '/settings/apps',
cashier_password: '/settings/cashier_password',
- contract: '/contract/:contract_id',
exclusion: '/settings/exclusion',
financial: '/settings/financial',
history: '/settings/history',
- index: '/index',
limits: '/settings/limits',
- mt5: '/mt5',
- dxtrade: '/derivx',
+ token: '/settings/token',
personal: '/settings/personal',
+
+ // reports
+ reports: '/reports',
positions: '/reports/positions',
profit: '/reports/profit',
- reports: '/reports',
- root: '/',
- reset_password: '/',
- redirect: '/redirect',
- settings: '/settings',
statement: '/reports/statement',
- token: '/settings/token',
- trade: '/',
- bot: '/bot',
+
+ // cashier
cashier: '/cashier',
cashier_deposit: '/cashier/deposit',
cashier_withdrawal: '/cashier/withdrawal',
@@ -55,6 +68,7 @@ export const routes = {
cashier_onramp: '/cashier/on-ramp',
cashier_p2p: '/cashier/p2p',
cashier_p2p_v2: '/cashier/p2p-v2',
+ cashier_pa_transfer: '/cashier/payment-agent-transfer',
// P2P
p2p_verification: '/cashier/p2p/verification',
@@ -65,26 +79,21 @@ export const routes = {
p2p_advertiser_page: '/cashier/p2p/advertiser',
p2p_v2_inner: '/cashier/p2p-v2/inner',
- cashier_pa_transfer: '/cashier/payment-agent-transfer',
- smarttrader: getUrlSmartTrader(),
- binarybot: getUrlBinaryBot(),
- endpoint: '/endpoint',
- complaints_policy: '/complaints-policy',
-
// Appstore
- appstore: '/appstore',
- traders_hub: '/appstore/traders-hub',
- onboarding: '/appstore/onboarding',
- compare_cfds: '/appstore/cfd-compare-acccounts',
+ old_traders_hub: '/appstore/traders-hub',
+ traders_hub: '/',
+ onboarding: '/onboarding',
+ compare_cfds: '/cfd-compare-acccounts',
// Wallets
- wallets: '/wallets',
- wallets_cashier: '/wallets/cashier',
- wallets_deposit: '/wallets/cashier/deposit',
- wallets_withdrawal: '/wallets/cashier/withdraw',
- wallets_transfer: '/wallets/cashier/transfer',
- wallets_transactions: '/wallets/cashier/transactions',
- wallets_compare_accounts: '/wallets/compare-accounts',
+ wallets: '/wallet',
+ wallets_deposit: '/wallet/deposit',
+ wallets_withdrawal: '/wallet/withdrawal',
+ wallets_transfer: '/wallet/account-transfer',
+ wallets_transactions: '/wallet/transactions',
+ wallets_compare_accounts: '/compare-accounts',
+ wallets_on_ramp: '/wallet/on-ramp',
+ wallets_reset_balance: '/wallet/reset-balance',
// Traders Hub
traders_hub_v2: '/traders-hub',
diff --git a/packages/stores/types.ts b/packages/stores/types.ts
index 406bdfdb158c..63040ef27817 100644
--- a/packages/stores/types.ts
+++ b/packages/stores/types.ts
@@ -67,6 +67,7 @@ type TRoutes =
| '/reports/profit'
| '/reports'
| '/'
+ | '/dtrader'
| '/redirect'
| '/settings'
| '/reports/statement'
@@ -88,7 +89,14 @@ type TRoutes =
| '/appstore'
| '/appstore/traders-hub'
| '/appstore/onboarding'
- | '/wallets';
+ | '/wallet'
+ | '/wallet/deposit'
+ | '/wallet/withdrawal'
+ | '/wallet/account-transfer'
+ | '/wallet/reset-balance'
+ | '/wallet/transactions'
+ | '/wallet/on-ramp'
+ | '/compare-accounts';
type TPopulateSettingsExtensionsMenuItem = {
icon: string;
diff --git a/packages/trader/src/App/Components/Elements/Modals/ServicesErrorModal/__tests__/insufficient-balance-modal.spec.tsx b/packages/trader/src/App/Components/Elements/Modals/ServicesErrorModal/__tests__/insufficient-balance-modal.spec.tsx
index fe4cdde3c975..22091acaddd1 100644
--- a/packages/trader/src/App/Components/Elements/Modals/ServicesErrorModal/__tests__/insufficient-balance-modal.spec.tsx
+++ b/packages/trader/src/App/Components/Elements/Modals/ServicesErrorModal/__tests__/insufficient-balance-modal.spec.tsx
@@ -3,6 +3,7 @@ import { screen, render } from '@testing-library/react';
import InsufficientBalanceModal from '../insufficient-balance-modal';
import { createBrowserHistory } from 'history';
import { Router } from 'react-router-dom';
+import { StoreProvider, mockStore } from '@deriv/stores';
import { routes } from '@deriv/shared';
import userEvent from '@testing-library/user-event';
@@ -19,16 +20,6 @@ type TModal = React.FC<{
}>;
};
-jest.mock('@deriv/stores', () => ({
- ...jest.requireActual('@deriv/stores'),
- observer: jest.fn(x => x),
- useStore: jest.fn(() => ({
- ui: {
- is_mobile: false,
- },
- })),
-}));
-
jest.mock('@deriv/components', () => {
const original_module = jest.requireActual('@deriv/components');
const Modal: TModal = jest.fn(({ children, is_open, title }) => {
@@ -58,35 +49,59 @@ describe('', () => {
message: 'test',
toggleModal: jest.fn(),
};
+ let mock_store: ReturnType;
+
+ beforeEach(() => {
+ mock_store = mockStore({
+ client: { has_wallet: false },
+ ui: {
+ is_mobile: false,
+ },
+ });
+ });
const history = createBrowserHistory();
- const renderWithRouter = (component: React.ReactElement) => {
- return render({component});
+
+ const wrapper = ({ children }: { children: React.ReactNode }) => {
+ return (
+
+ {children}
+
+ );
};
it('modal title, and modal description should be rendered', () => {
- renderWithRouter();
+ render(, { wrapper });
expect(screen.getByText(/insufficient balance/i)).toBeInTheDocument();
expect(screen.getByText(/test/i)).toBeInTheDocument();
});
it('button text should be OK if is_virtual is true and toggleModal should be called if user clicks on the button', () => {
- renderWithRouter();
+ render(, { wrapper });
const button = screen.getByText(/ok/i);
expect(button).toBeInTheDocument();
userEvent.click(button);
expect(mocked_props.toggleModal).toHaveBeenCalled();
});
- it('button text should be "Deposit now" if is_virtual is false and should navigate to bla bla if you click on the button', () => {
+ it('button text should be "Deposit now" if is_virtual is false and should navigate to cashier deposit page if client has CR account and click on the button', () => {
mocked_props.is_virtual = false;
- renderWithRouter();
+ render(, { wrapper });
const button = screen.getByText(/deposit now/i);
expect(button).toBeInTheDocument();
userEvent.click(button);
expect(history.location.pathname).toBe(routes.cashier_deposit);
});
+ it('button text should be "Deposit now" if is_virtual is false and should navigate to wallets overlay deposit tab if client has CRW account and click on the button', () => {
+ mocked_props.is_virtual = false;
+ mock_store.client.has_wallet = true;
+ render(, { wrapper });
+ const button = screen.getByText(/deposit now/i);
+ expect(button).toBeInTheDocument();
+ userEvent.click(button);
+ expect(history.location.pathname).toBe(routes.wallets_deposit);
+ });
it('should return null when is_visible is false', () => {
mocked_props.is_visible = false;
- const { container } = renderWithRouter();
+ const { container } = render(, { wrapper });
expect(container).toBeEmptyDOMElement();
});
});
diff --git a/packages/trader/src/App/Components/Elements/Modals/ServicesErrorModal/insufficient-balance-modal.tsx b/packages/trader/src/App/Components/Elements/Modals/ServicesErrorModal/insufficient-balance-modal.tsx
index f4fe48a7c416..9d76b3bee56b 100644
--- a/packages/trader/src/App/Components/Elements/Modals/ServicesErrorModal/insufficient-balance-modal.tsx
+++ b/packages/trader/src/App/Components/Elements/Modals/ServicesErrorModal/insufficient-balance-modal.tsx
@@ -16,7 +16,9 @@ const InsufficientBalanceModal = observer(
({ history, is_virtual, is_visible, message, toggleModal }: TInsufficientBalanceModal) => {
const {
ui: { is_mobile },
+ client,
} = useStore();
+ const { has_wallet } = client;
return (
{
if (!is_virtual) {
- history?.push?.(routes.cashier_deposit);
+ history?.push?.(has_wallet ? routes.wallets_deposit : routes.cashier_deposit);
} else {
toggleModal();
}
diff --git a/packages/trader/src/App/Components/Routes/__tests__/binary-link.spec.tsx b/packages/trader/src/App/Components/Routes/__tests__/binary-link.spec.tsx
index c37ff374e150..948f5760581e 100644
--- a/packages/trader/src/App/Components/Routes/__tests__/binary-link.spec.tsx
+++ b/packages/trader/src/App/Components/Routes/__tests__/binary-link.spec.tsx
@@ -2,6 +2,8 @@ import React from 'react';
import { render, screen } from '@testing-library/react';
import { BrowserRouter } from 'react-router-dom';
import { BinaryLink } from '../index';
+import userEvent from '@testing-library/user-event';
+import { routes } from '@deriv/shared';
type TMockBinaryLink = {
to?: string;
@@ -17,22 +19,24 @@ const MockBinaryLink = ({ to }: TMockBinaryLink) => (
describe('BinaryLink component', () => {
it('should render "children" when passed in', () => {
- render();
+ render();
expect(screen.getByTestId('dt_child')).toBeInTheDocument();
});
it('should have "active_class" when passed in', () => {
- render();
- expect(screen.getByTestId('dt_binary_link')).toHaveClass('active_class');
+ render();
+ userEvent.click(screen.getByTestId('dt_binary_link'));
+ const link = screen.getByTestId('dt_binary_link');
+ expect(link).toHaveClass('active_class');
});
- it('should render "NavLink" when "to" property is passed', () => {
- render();
+ it('should render "NavLink" when valid "to" property is passed', () => {
+ render();
expect(screen.getByTestId('dt_binary_link')).toBeInTheDocument();
});
- it('should render "a" element whe property "to" is not passed', () => {
- render();
- expect(screen.getByTestId('dt_binary_link')).toBeInTheDocument();
+ it('throws an error for an invalid route', () => {
+ const viewComponent = () => render();
+ expect(viewComponent).toThrowError('Route not found: /invalid');
});
});
diff --git a/packages/trader/src/App/Constants/__tests__/routes-config.spec.tsx b/packages/trader/src/App/Constants/__tests__/routes-config.spec.tsx
index 106188e63030..19278fe068b6 100644
--- a/packages/trader/src/App/Constants/__tests__/routes-config.spec.tsx
+++ b/packages/trader/src/App/Constants/__tests__/routes-config.spec.tsx
@@ -2,6 +2,7 @@ import React, { ComponentProps } from 'react';
import { Router } from 'react-router';
import { createMemoryHistory } from 'history';
import { mockStore } from '@deriv/stores';
+import { routes as routesList } from '@deriv/shared';
import { render, screen, waitFor } from '@testing-library/react';
import BinaryRoutes from 'App/Components/Routes';
import TraderProviders from '../../../trader-providers';
@@ -49,7 +50,7 @@ describe('Routes Config', () => {
it('should return routes with contract route', async () => {
const routes = getRoutesConfig();
- expect(routes?.[0]?.path).toBe('/contract/:contract_id');
+ expect(routes?.[0]?.path).toBe(routesList.contract);
expect(routes?.[0]?.getTitle?.()).toBe('Contract Details');
expect(routes?.[0]?.is_authenticated).toBe(true);
const history = createMemoryHistory();
@@ -62,11 +63,11 @@ describe('Routes Config', () => {
it('should return routes with trade route', async () => {
const routes = getRoutesConfig();
- expect(routes?.[1]?.path).toBe('/');
+ expect(routes?.[1]?.path).toBe(routesList.trade);
expect(routes?.[1]?.getTitle?.()).toBe('Trader');
expect(routes?.[1]?.exact).toBe(true);
const history = createMemoryHistory();
- history.push('/');
+ history.push(routesList.trade);
render();
await waitFor(() => {
expect(screen.getByText('Trader')).toBeInTheDocument();
diff --git a/packages/trader/src/App/Containers/Routes/routes.tsx b/packages/trader/src/App/Containers/Routes/routes.tsx
index 76f9130024f7..457d8f4b9a68 100644
--- a/packages/trader/src/App/Containers/Routes/routes.tsx
+++ b/packages/trader/src/App/Containers/Routes/routes.tsx
@@ -20,7 +20,7 @@ type TTradePageMountingMiddlewareParams = {
path_to: string;
};
-export const checkRoutingMatch = (route_list: Array, path = '') => {
+export const checkRoutingMatch = (route_list: Array, path = '/dtrader') => {
return route_list.some(route => !!matchPath(path, { path: route, exact: true }));
};
diff --git a/packages/trader/src/App/Containers/__tests__/trade-footer-extensions.spec.tsx b/packages/trader/src/App/Containers/__tests__/trade-footer-extensions.spec.tsx
index c39e637b94b7..ec7b116efd17 100644
--- a/packages/trader/src/App/Containers/__tests__/trade-footer-extensions.spec.tsx
+++ b/packages/trader/src/App/Containers/__tests__/trade-footer-extensions.spec.tsx
@@ -5,6 +5,7 @@ import TradeFooterExtensions from '../trade-footer-extensions';
import { mockStore } from '@deriv/stores';
import { RouteComponentProps, Router } from 'react-router-dom';
import { MemoryHistory, createMemoryHistory } from 'history';
+import { routes } from '@deriv/shared';
describe('', () => {
let mock_store: ReturnType,
@@ -41,7 +42,7 @@ describe('', () => {
mock_store.client.is_logged_in = true;
router_prop = {
location: {
- pathname: '/',
+ pathname: routes.trade,
},
};
renderTraderFooterExtensions(router_prop);
@@ -57,7 +58,7 @@ describe('', () => {
it('should call populateFooterExtensions with empty array when pathname is not trader', () => {
router_prop = {
location: {
- pathname: '/cashier',
+ pathname: routes.cashier,
},
};
renderTraderFooterExtensions(router_prop);
diff --git a/packages/tradershub/src/constants/constants.tsx b/packages/tradershub/src/constants/constants.tsx
index a04f442b6b78..f9315cae6943 100644
--- a/packages/tradershub/src/constants/constants.tsx
+++ b/packages/tradershub/src/constants/constants.tsx
@@ -28,7 +28,7 @@ export const optionsAndMultipliersContent = (isEU: boolean) => [
{
description: isEU ? 'Multipliers trading platform.' : 'Options and multipliers trading platform.',
icon: ,
- redirect: '/',
+ redirect: '/dtrader',
smallIcon: ,
title: 'Deriv Trader',
},
diff --git a/packages/wallets/component-tests/crypto-payment-redirection.spec.tsx b/packages/wallets/component-tests/crypto-payment-redirection.spec.tsx
index 03a75577901a..72b328bb5bbf 100644
--- a/packages/wallets/component-tests/crypto-payment-redirection.spec.tsx
+++ b/packages/wallets/component-tests/crypto-payment-redirection.spec.tsx
@@ -28,14 +28,14 @@ test.describe('Wallets - Crypto withdrawal', () => {
},
});
- await page.goto(`${baseURL}/wallets`);
+ await page.goto(`${baseURL}/`);
await page.click('.wallets-textfield__field--listcard');
await page.click('#downshift-0-item-1');
});
test('render withdrawal form with all elements', async ({ baseURL, page }) => {
- await page.goto(`${baseURL}/wallets/cashier/withdraw?verification=XXXX`);
+ await page.goto(`${baseURL}/wallet/withdrawal?verification=XXXX`);
// #cryptoAddress
await expect(page.locator('#cryptoAddress')).toBeVisible();
@@ -59,7 +59,7 @@ test.describe('Wallets - Crypto withdrawal', () => {
});
test('displays validation messages for address field', async ({ baseURL, page }) => {
- await page.goto(`${baseURL}/wallets/cashier/withdraw?verification=XXXX`);
+ await page.goto(`${baseURL}/wallet/withdrawal?verification=XXXX`);
// given initial state, no validation message should be visible
let validationMessage = await page.locator('text=This field is required.');
@@ -85,7 +85,7 @@ test.describe('Wallets - Crypto withdrawal', () => {
});
test('balance meter is empty initially', async ({ baseURL, page }) => {
- await page.goto(`${baseURL}/wallets/cashier/withdraw?verification=XXXX`);
+ await page.goto(`${baseURL}/wallet/withdrawal?verification=XXXX`);
// percentage selector, visible
await expect(page.locator('.wallets-percentage-selector')).toBeVisible();
@@ -119,7 +119,7 @@ test.describe('Wallets - Crypto withdrawal', () => {
baseURL,
page,
}) => {
- await page.goto(`${baseURL}/wallets/cashier/withdraw?verification=XXXX`);
+ await page.goto(`${baseURL}/wallet/withdrawal?verification=XXXX`);
// percentage selector, visible
await expect(page.locator('.wallets-percentage-selector')).toBeVisible();
@@ -156,7 +156,7 @@ test.describe('Wallets - Crypto withdrawal', () => {
baseURL,
page,
}) => {
- await page.goto(`${baseURL}/wallets/cashier/withdraw?verification=XXXX`);
+ await page.goto(`${baseURL}/wallet/withdrawal?verification=XXXX`);
// percentage selector, visible
await expect(page.locator('.wallets-percentage-selector')).toBeVisible();
@@ -190,7 +190,7 @@ test.describe('Wallets - Crypto withdrawal', () => {
});
test('balance meter displays still displays 100% when amount exceeds balance', async ({ baseURL, page }) => {
- await page.goto(`${baseURL}/wallets/cashier/withdraw?verification=XXXX`);
+ await page.goto(`${baseURL}/wallet/withdrawal?verification=XXXX`);
// percentage selector, visible
await expect(page.locator('.wallets-percentage-selector')).toBeVisible();
@@ -224,7 +224,7 @@ test.describe('Wallets - Crypto withdrawal', () => {
});
test('validates crypto input against current balance and minimum withdrawal amount', async ({ baseURL, page }) => {
- await page.goto(`${baseURL}/wallets/cashier/withdraw?verification=XXXX`);
+ await page.goto(`${baseURL}/wallet/withdrawal?verification=XXXX`);
// given initial state, no validation message should be shown
await expect(
@@ -283,7 +283,7 @@ test.describe('Wallets - Crypto withdrawal', () => {
});
test('converts fiat to crypto and vice versa', async ({ baseURL, page }) => {
- await page.goto(`${baseURL}/wallets/cashier/withdraw?verification=XXXX`);
+ await page.goto(`${baseURL}/wallet/withdrawal?verification=XXXX`);
// given some amount of crypto being put to input, convert it to fiat
await page.fill('#cryptoAmount', '10');
@@ -295,7 +295,7 @@ test.describe('Wallets - Crypto withdrawal', () => {
});
test('submit button validity', async ({ baseURL, page }) => {
- await page.goto(`${baseURL}/wallets/cashier/withdraw?verification=XXXX`);
+ await page.goto(`${baseURL}/wallet/withdrawal?verification=XXXX`);
// given initial state, submit button should be disabled
await expect(page.locator('.wallets-withdrawal-crypto-form__submit button[type="submit"]')).toBeDisabled();
@@ -318,7 +318,7 @@ test.describe('Wallets - Crypto withdrawal', () => {
});
test('spinner while submitting', async ({ baseURL, page }) => {
- await page.goto(`${baseURL}/wallets/cashier/withdraw?verification=XXXX`);
+ await page.goto(`${baseURL}/wallet/withdrawal?verification=XXXX`);
// given initial state, submit button should be disabled
await expect(page.locator('.wallets-withdrawal-crypto-form__submit button[type="submit"]')).toBeDisabled();
diff --git a/packages/wallets/component-tests/menu.spec.tsx b/packages/wallets/component-tests/menu.spec.tsx
index 75a62da3d268..a74e7d66eb95 100644
--- a/packages/wallets/component-tests/menu.spec.tsx
+++ b/packages/wallets/component-tests/menu.spec.tsx
@@ -24,7 +24,7 @@ test.describe('Wallets - Traders Hub', () => {
accounts: DEFAULT_WALLET_ACCOUNTS,
},
});
- await page.goto(`${baseURL}/wallets`);
+ await page.goto(`${baseURL}/`);
const balanceContainer = await page.textContent('.wallets-balance__container');
expect(balanceContainer).toContain('9,988,000.89 USD');
diff --git a/packages/wallets/component-tests/wallets-carousel-content.spec.tsx b/packages/wallets/component-tests/wallets-carousel-content.spec.tsx
index 3ac1cb01cf60..f7c766dcf5c2 100644
--- a/packages/wallets/component-tests/wallets-carousel-content.spec.tsx
+++ b/packages/wallets/component-tests/wallets-carousel-content.spec.tsx
@@ -57,7 +57,7 @@ test.describe('Wallets - Mobile carousel', () => {
});
test('renders cards for all wallets', async ({ baseURL }) => {
- await mobilePage.goto(`${baseURL}/wallets`);
+ await mobilePage.goto(`${baseURL}/`);
// Ensure the carousel is loaded and visible
await mobilePage.waitForSelector(CAROUSEL_SELECTOR);
@@ -90,7 +90,7 @@ test.describe('Wallets - Mobile carousel', () => {
});
test('renders progress bar with active item and updates it when swiping', async ({ baseURL }) => {
- await mobilePage.goto(`${baseURL}/wallets`);
+ await mobilePage.goto(`${baseURL}/`);
const activeProgressBarItem = mobilePage.locator('.wallets-progress-bar div:nth-child(1)');
const progressBarItemClass = await activeProgressBarItem.getAttribute('class');
@@ -117,7 +117,7 @@ test.describe('Wallets - Mobile carousel', () => {
test('switches account when clicking on progress bar', async ({ baseURL }) => {
// given
- await mobilePage.goto(`${baseURL}/wallets`);
+ await mobilePage.goto(`${baseURL}/`);
const progressBarItem = mobilePage.locator('.wallets-progress-bar div:nth-child(3)');
diff --git a/packages/wallets/src/AppContent.scss b/packages/wallets/src/AppContent.scss
index e7855a5e5a3d..471a0417d705 100644
--- a/packages/wallets/src/AppContent.scss
+++ b/packages/wallets/src/AppContent.scss
@@ -5,7 +5,7 @@
gap: 2.4rem;
width: 100%;
align-self: stretch;
- background: var(--system-light-7-secondary-background, #f2f3f4);
+ background-color: var(--general-main-1, #ffffff);
min-height: calc(100vh - 8.4rem); // 100vh - (4.8rem header + 3.6rem footer)
@include mobile {
diff --git a/packages/wallets/src/components/DerivAppsSection/DerivAppsSuccessFooter.tsx b/packages/wallets/src/components/DerivAppsSection/DerivAppsSuccessFooter.tsx
index fc576c15f735..d6221522bbed 100644
--- a/packages/wallets/src/components/DerivAppsSection/DerivAppsSuccessFooter.tsx
+++ b/packages/wallets/src/components/DerivAppsSection/DerivAppsSuccessFooter.tsx
@@ -18,7 +18,7 @@ const DerivAppsSuccessFooter = () => {
{
- history.push('/wallets/cashier/transfer');
+ history.push('/wallet/account-transfer');
hide();
}}
size='lg'
diff --git a/packages/wallets/src/components/DerivAppsSection/DerivAppsTradingAccount.tsx b/packages/wallets/src/components/DerivAppsSection/DerivAppsTradingAccount.tsx
index 16bfc88928f4..3c123808796f 100644
--- a/packages/wallets/src/components/DerivAppsSection/DerivAppsTradingAccount.tsx
+++ b/packages/wallets/src/components/DerivAppsSection/DerivAppsTradingAccount.tsx
@@ -39,8 +39,8 @@ const DerivAppsTradingAccount: React.FC = () => {
className='wallets-deriv-apps-section__button'
onClick={() => {
activeWallet?.is_virtual
- ? history.push('/wallets/cashier/reset-balance')
- : history.push('/wallets/cashier/transfer', {
+ ? history.push('/wallet/reset-balance')
+ : history.push('/wallet/account-transfer', {
toAccountLoginId: activeLinkedToTradingAccount?.loginid,
});
}}
diff --git a/packages/wallets/src/components/Page404/Page404.scss b/packages/wallets/src/components/Page404/Page404.scss
new file mode 100644
index 000000000000..5cef58c4a322
--- /dev/null
+++ b/packages/wallets/src/components/Page404/Page404.scss
@@ -0,0 +1,5 @@
+.wallets-page-404 {
+ display: flex;
+ align-items: center;
+ height: calc(100vh - 8.4rem);
+}
diff --git a/packages/wallets/src/components/Page404/Page404.tsx b/packages/wallets/src/components/Page404/Page404.tsx
new file mode 100644
index 000000000000..0f516223f761
--- /dev/null
+++ b/packages/wallets/src/components/Page404/Page404.tsx
@@ -0,0 +1,49 @@
+import React from 'react';
+import { Trans } from 'react-i18next';
+import { useHistory } from 'react-router-dom';
+import useDevice from '../../hooks/useDevice';
+import { WalletButton, WalletText } from '../Base';
+import { WalletsActionScreen } from '../WalletsActionScreen';
+import './Page404.scss';
+
+const Page404 = () => {
+ const { isMobile } = useDevice();
+ const titleSize = isMobile ? 'md' : '2xl';
+ const descriptionSize = isMobile ? 'sm' : 'md';
+ const buttonSize = isMobile ? 'lg' : 'md';
+ const buttonTextSize = isMobile ? 'md' : 'sm';
+
+ const history = useHistory();
+
+ const errorImage = isMobile ? (
+
+ ) : (
+
+ );
+
+ return (
+
+ (
+ {
+ history.push('/');
+ }}
+ size={buttonSize}
+ >
+
+
+
+
+ )}
+ title="We couldn't find that page"
+ titleSize={titleSize}
+ />
+
+ );
+};
+
+export default Page404;
diff --git a/packages/wallets/src/components/Page404/index.ts b/packages/wallets/src/components/Page404/index.ts
new file mode 100644
index 000000000000..2cdfcb114cb8
--- /dev/null
+++ b/packages/wallets/src/components/Page404/index.ts
@@ -0,0 +1 @@
+export { default as Page404 } from './Page404';
diff --git a/packages/wallets/src/components/WalletListCardActions/WalletListCardActions.tsx b/packages/wallets/src/components/WalletListCardActions/WalletListCardActions.tsx
index 4cf78bc0d3fa..234c82e9cd8b 100644
--- a/packages/wallets/src/components/WalletListCardActions/WalletListCardActions.tsx
+++ b/packages/wallets/src/components/WalletListCardActions/WalletListCardActions.tsx
@@ -25,7 +25,7 @@ const getWalletHeaderButtons = (isDemo?: boolean) => {
className: 'wallets-mobile-actions-content-icon',
color: 'white',
icon: ,
- name: 'withdraw',
+ name: 'withdrawal',
text: 'Withdraw',
variant: 'outlined',
},
@@ -33,22 +33,16 @@ const getWalletHeaderButtons = (isDemo?: boolean) => {
className: 'wallets-mobile-actions-content-icon',
color: 'white',
icon: ,
- name: 'transfer',
+ name: 'account-transfer',
text: 'Transfer',
variant: 'outlined',
},
] as const;
// Filter out the "Withdraw" button when is_demo is true
- const filteredButtons = isDemo ? buttons.filter(button => button.name !== 'withdraw') : buttons;
+ const filteredButtons = isDemo ? buttons.filter(button => button.name !== 'withdrawal') : buttons;
- const orderForDemo = ['reset-balance', 'transfer'];
-
- const sortedButtons = isDemo
- ? [...filteredButtons].sort((a, b) => orderForDemo.indexOf(a.name) - orderForDemo.indexOf(b.name))
- : filteredButtons;
-
- return sortedButtons;
+ return filteredButtons;
};
const WalletListCardActions = () => {
@@ -71,7 +65,7 @@ const WalletListCardActions = () => {
color={button.color}
icon={button.icon}
onClick={() => {
- history.push(`/wallets/cashier/${button.name}`);
+ history.push(`/wallet/${button.name}`);
}}
size='lg'
/>
@@ -92,7 +86,7 @@ const WalletListCardActions = () => {
icon={button.icon}
key={button.name}
onClick={() => {
- history.push(`/wallets/cashier/${button.name}`);
+ history.push(`/wallet/${button.name}`);
}}
rounded='lg'
variant={button.variant}
diff --git a/packages/wallets/src/components/WalletListCardActions/__tests__/WalletListCardActions.spec.tsx b/packages/wallets/src/components/WalletListCardActions/__tests__/WalletListCardActions.spec.tsx
index 2c1c9c9ce3de..9e98469c48ec 100644
--- a/packages/wallets/src/components/WalletListCardActions/__tests__/WalletListCardActions.spec.tsx
+++ b/packages/wallets/src/components/WalletListCardActions/__tests__/WalletListCardActions.spec.tsx
@@ -90,7 +90,7 @@ describe('WalletListCardActions', () => {
render(, { wrapper });
screen.getByRole('button', { name: 'deposit' }).click();
- expect(history.location.pathname).toBe('/wallets/cashier/deposit');
+ expect(history.location.pathname).toBe('/wallet/deposit');
});
it('should render the actions for mobile', () => {
@@ -109,25 +109,25 @@ describe('WalletListCardActions', () => {
wrapper,
});
screen.getByRole('button', { name: 'deposit' }).click();
- expect(history.location.pathname).toBe('/wallets/cashier/deposit');
+ expect(history.location.pathname).toBe('/wallet/deposit');
});
it('should redirect to cashier page when clicking on deposit', () => {
render(, { wrapper });
screen.getByRole('button', { name: 'deposit' }).click();
- expect(history.location.pathname).toBe('/wallets/cashier/deposit');
+ expect(history.location.pathname).toBe('/wallet/deposit');
});
it('should redirect to cashier page when clicking on withdraw', () => {
render(, { wrapper });
- screen.getByRole('button', { name: 'withdraw' }).click();
- expect(history.location.pathname).toBe('/wallets/cashier/withdraw');
+ screen.getByRole('button', { name: 'withdrawal' }).click();
+ expect(history.location.pathname).toBe('/wallet/withdrawal');
});
it('should redirect to cashier page when clicking on transfer', () => {
render(, { wrapper });
- screen.getByRole('button', { name: 'transfer' }).click();
- expect(history.location.pathname).toBe('/wallets/cashier/transfer');
+ screen.getByRole('button', { name: 'account-transfer' }).click();
+ expect(history.location.pathname).toBe('/wallet/account-transfer');
});
it('should redirect to cashier page when clicking on reset balance', () => {
@@ -144,6 +144,6 @@ describe('WalletListCardActions', () => {
render(, { wrapper });
screen.getByRole('button', { name: 'reset-balance' }).click();
- expect(history.location.pathname).toBe('/wallets/cashier/reset-balance');
+ expect(history.location.pathname).toBe('/wallet/reset-balance');
});
});
diff --git a/packages/wallets/src/components/WalletNoWalletFoundState/WalletNoWalletFoundState.scss b/packages/wallets/src/components/WalletNoWalletFoundState/WalletNoWalletFoundState.scss
deleted file mode 100644
index 9ee90447a9b7..000000000000
--- a/packages/wallets/src/components/WalletNoWalletFoundState/WalletNoWalletFoundState.scss
+++ /dev/null
@@ -1,40 +0,0 @@
-.wallets-no-wallet-found-state {
- width: 100%;
- height: calc(100vh - 84px);
- display: flex;
- align-items: center;
- justify-content: center;
- gap: 0.5rem;
- background: var(--system-light-8-primary-background, #fff);
-
- @include mobile {
- height: calc(100vh - 44px);
- flex-direction: column;
- }
-
- &__container {
- display: flex;
- flex-direction: column;
- align-items: start;
- gap: 4rem;
- padding-inline: 0.5rem;
-
- @include mobile {
- align-items: center;
- }
- }
-
- &__content {
- display: flex;
- flex-direction: column;
- gap: 1rem;
-
- @include mobile {
- align-items: center;
- }
- }
-
- &__emphasized-text {
- color: var(--brand-coral, #ff444f);
- }
-}
diff --git a/packages/wallets/src/components/WalletNoWalletFoundState/WalletNoWalletFoundState.tsx b/packages/wallets/src/components/WalletNoWalletFoundState/WalletNoWalletFoundState.tsx
deleted file mode 100644
index 9c5b8a3da665..000000000000
--- a/packages/wallets/src/components/WalletNoWalletFoundState/WalletNoWalletFoundState.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import React from 'react';
-import { useHistory } from 'react-router-dom';
-import useDevice from '../../hooks/useDevice';
-import NoWalletIcon from '../../public/images/no-wallet.svg';
-import { WalletButton, WalletText } from '../Base';
-import './WalletNoWalletFoundState.scss';
-
-const WalletNoWalletFoundState: React.FC = () => {
- const { isMobile } = useDevice();
- const history = useHistory();
-
- return (
-
-
-
-
-
- You have no wallet account 🐣
-
-
- Disable the next_wallet{' '}
- feature flag to see Trader's Hub.
-
-
-
history.push('/endpoint')} size='lg'>
- Endpoint
-
-
-
- );
-};
-
-export default WalletNoWalletFoundState;
diff --git a/packages/wallets/src/components/WalletNoWalletFoundState/index.ts b/packages/wallets/src/components/WalletNoWalletFoundState/index.ts
deleted file mode 100644
index 2d5186e3af2c..000000000000
--- a/packages/wallets/src/components/WalletNoWalletFoundState/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { default as WalletNoWalletFoundState } from './WalletNoWalletFoundState';
diff --git a/packages/wallets/src/components/WalletsAddMoreCardBanner/WalletsAddMoreCardBanner.tsx b/packages/wallets/src/components/WalletsAddMoreCardBanner/WalletsAddMoreCardBanner.tsx
index 056166d1645c..7b2bff25d297 100644
--- a/packages/wallets/src/components/WalletsAddMoreCardBanner/WalletsAddMoreCardBanner.tsx
+++ b/packages/wallets/src/components/WalletsAddMoreCardBanner/WalletsAddMoreCardBanner.tsx
@@ -31,7 +31,7 @@ const WalletsAddMoreCardBanner: React.FC = ({
modal.hide()} variant='outlined'>
Maybe later
- history.push('/wallets/cashier/deposit')}>Deposit now
+ history.push('/wallet/deposit')}>Deposit now
),
[history] // eslint-disable-line react-hooks/exhaustive-deps
@@ -57,7 +57,7 @@ const WalletsAddMoreCardBanner: React.FC