Skip to content

Commit

Permalink
chore: merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
amina-deriv committed Jun 22, 2023
2 parents aaeeaf2 + 6c0eb46 commit 44390b1
Show file tree
Hide file tree
Showing 90 changed files with 2,066 additions and 1,468 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ jobs:
build_and_test:
docker:
- image: cimg/node:18.16.0
resource_class: xlarge
resource_class: large
steps:
- git_checkout_from_cache
- npm_install_from_cache
Expand Down
1 change: 1 addition & 0 deletions packages/account/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"@deriv/api-types": "^1.0.94",
"@deriv/components": "^1.0.0",
"@deriv/shared": "^1.0.0",
"@deriv/stores":"^1.0.0",
"@deriv/translations": "^1.0.0",
"bowser": "^2.9.0",
"classnames": "^2.2.6",
Expand Down
16 changes: 8 additions & 8 deletions packages/account/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
import React from 'react';
import Routes from './Containers/routes';
import ResetTradingPassword from './Containers/reset-trading-password';
import { MobxContentProvider } from './Stores/connect';
import initStore from './Stores/init-store';
import TCoreStore from './Stores/index';
import { setWebsocket } from '@deriv/shared';
import { StoreProvider } from '@deriv/stores';
import { TCoreStores } from '@deriv/stores/types';

// TODO: add correct types for stores and WS after implementing them
// TODO: add correct types for WS after implementing them
type TAppProps = {
passthrough: {
root_store: TCoreStore;
root_store: TCoreStores;
WS: Record<string, any>;
};
};

const App = ({ passthrough }: TAppProps) => {
const { root_store, WS } = passthrough;
initStore(root_store, WS);
setWebsocket(WS);

const { notification_messages_ui: Notifications } = root_store.ui;

return (
<MobxContentProvider store={root_store}>
<StoreProvider store={root_store}>
{Notifications && <Notifications />}
<Routes />
<ResetTradingPassword />
</MobxContentProvider>
</StoreProvider>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ import { PlatformContext } from '@deriv/shared';
import { findRouteByPath } from '../helpers';
import BinaryLink from '../binary-link';

jest.mock('Stores/connect', () => ({
__esModule: true,
default: 'mockedDefaultExport',
connect: () => Component => Component,
}));

jest.mock('../helpers', () => ({
findRouteByPath: jest.fn(() => '/test/path'),
normalizePath: jest.fn(() => '/test/path'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ import { render, screen } from '@testing-library/react';
import { PlatformContext } from '@deriv/shared';
import BinaryRoutes from '../binary-routes';

jest.mock('Stores/connect', () => ({
__esModule: true,
default: 'mockedDefaultExport',
connect: () => Component => Component,
}));

jest.mock('../route-with-sub-routes', () => jest.fn(() => <div>RouteWithSubRoutes</div>));

jest.mock('Constants/routes-config', () => () => [{}]);
Expand Down
Loading

0 comments on commit 44390b1

Please sign in to comment.