Skip to content

Commit

Permalink
Merge branch 'master' into kate/DTRA-175_only_ups
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-hosseini-deriv committed Jul 21, 2023
2 parents a8c056b + 8623b8a commit 2ac9198
Show file tree
Hide file tree
Showing 221 changed files with 4,629 additions and 2,838 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ jobs:
build_and_test:
docker:
- image: cimg/node:18.16.0
resource_class: large
resource_class: xlarge
steps:
- git_checkout_from_cache
- npm_install_from_cache
Expand Down
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ module.exports = {
version: 'detect',
},
'import/resolver': {
typescript: {
// use an array
project: 'packages/**/tsconfig.json',
},
node: {
extensions: ['.ts', '.tsx'],
moduleDirectory: ['src', 'node_modules'],
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/automationrc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"skip_pending_checks": false,
"skip_slack_integration": false,
"skip_updating_branch": true,
"merge_delay": 120000,
"skip_updating_branch": false,
"merge_delay": 1200000,
"first_merge_delay": 1200000,
"max_task_count": 15,
"pull_request": {
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This repository contains the various platforms of the Deriv application.
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)
![Sonar Tech Debt](https://img.shields.io/sonar/tech_debt/binary-com_deriv-app?server=https%3A%2F%2Fsonarcloud.io)
![Sonar Violations (short format)](https://img.shields.io/sonar/violations/binary-com_deriv-app?server=https%3A%2F%2Fsonarcloud.io)
[![codecov](https://codecov.io/gh/binary-com/deriv-app/branch/dev/graph/badge.svg?token=LClg2rlZ4z)](https://codecov.io/gh/binary-com/deriv-app)
[![Coverage Status](https://coveralls.io/repos/github/binary-com/deriv-app/badge.svg?branch=master)](https://coveralls.io/github/binary-com/deriv-app?branch=master)

**In this document**:

Expand Down
1,963 changes: 1,279 additions & 684 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"eslint-config-binary": "^1.0.2",
"eslint-config-prettier": "^7.2.0",
"eslint-formatter-pretty": "^4.0.0",
"eslint-import-resolver-typescript": "^2.7.1",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-import-resolver-webpack": "^0.13.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jest-dom": "^3.8.1",
Expand Down
3 changes: 1 addition & 2 deletions packages/account/build/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ const {
js_loaders,
svg_file_loaders,
svg_loaders,
IS_RELEASE,
} = require('./loaders-config');

const IS_RELEASE = process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'staging';

const ALIASES = {
Assets: path.resolve(__dirname, '../src/Assets'),
Components: path.resolve(__dirname, '../src/Components'),
Expand Down
4 changes: 3 additions & 1 deletion packages/account/build/loaders-config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const path = require('path');
const { IS_RELEASE } = require('./constants');

const IS_RELEASE = process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'staging';

const js_loaders = [
{
Expand Down Expand Up @@ -107,4 +108,5 @@ module.exports = {
svg_loaders,
svg_file_loaders,
css_loaders,
IS_RELEASE,
};
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,27 +1,27 @@
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);

return (
<MobxContentProvider store={root_store}>
<StoreProvider store={root_store}>
<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 2ac9198

Please sign in to comment.