Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into test-coverage-dbot
Browse files Browse the repository at this point in the history
  • Loading branch information
vinu-deriv committed Sep 22, 2023
2 parents 3a4054e + 0e24aac commit 3bc95b7
Show file tree
Hide file tree
Showing 918 changed files with 17,094 additions and 12,441 deletions.
14 changes: 8 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,17 @@ jobs:
name: "Check TypeScript for @deriv/stores"
command: npx tsc --project packages/stores/tsconfig.json -noEmit
- run:
name: "Check TypeScript and linting for @deriv/wallets"
command: |
npx tsc --project packages/wallets/tsconfig.json -noEmit
npx eslint --fix --config packages/wallets/.eslintrc.js packages/wallets
npx stylelint packages/wallets/**/*.scss
name: "Check TypeScript for @deriv/wallets"
command: npx tsc --project packages/wallets/tsconfig.json -noEmit
# - run:
# name: "Check TypeScript for @deriv/cashier"
# command: npx tsc --project packages/cashier/tsconfig.json -noEmit
- run:
name: "Check ESLint for @deriv/wallets"
command: npx eslint --fix --config packages/wallets/.eslintrc.js packages/wallets
- run:
name: "Check Stylelint for @deriv/wallets"
command: npx stylelint packages/wallets/**/*.scss
- run:
name: "Check tests for @deriv/hooks"
command: bash ./scripts/check-tests.sh packages/hooks/src
Expand Down
12 changes: 12 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,15 @@
/packages/trader/**/* @matin-deriv @maryia-deriv


# ==============================================================
# deriv-app/wallets
# ==============================================================

/packages/wallets/**/* @adrienne-deriv @thisyahlen-deriv @farhan-nurzi-deriv


# ==============================================================
# deriv-app/api
# ==============================================================

/packages/api/**/* @adrienne-deriv @thisyahlen-deriv @farhan-nurzi-deriv
31 changes: 24 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/account/src/Components/Routes/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { match, matchPath, RouteProps } from 'react-router';
import { routes } from '@deriv/shared';
import { TRouteConfig } from 'Types';

export const normalizePath = (path: string) => (/^\//.test(path) ? path : `/${path || ''}`); // Default to '/'
export const normalizePath = (path: string) => (path.startsWith('/') ? path : `/${path || ''}`); // Default to '/'

export const findRouteByPath = (path: string, routes_config?: TRouteConfig[]): RouteProps | undefined => {
let result: RouteProps | undefined;
Expand Down Expand Up @@ -31,7 +31,7 @@ export const findRouteByPath = (path: string, routes_config?: TRouteConfig[]): R
};

export const isRouteVisible = (route?: { is_authenticated: boolean }, is_logged_in?: boolean) =>
!(route && route.is_authenticated && !is_logged_in);
!(route?.is_authenticated && !is_logged_in);

export const getPath = (route_path: string, params: { [key: string]: string } = {}) =>
Object.keys(params).reduce((p, name) => p.replace(`:${name}`, params[name]), route_path);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const RouteWithSubRoutes = (route: TRouteWithSubRoutesProps) => {
);
}

const title = route.getTitle?.() || '';
const title = route.getTitle?.() ?? '';
document.title = `${title} | ${default_title}`;

alternateLinkTagChange();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const AccountLimitsTableCell = ({
{children}
</Text>
)}
{renderExtraInfo && renderExtraInfo()}
{renderExtraInfo?.()}
</td>
</React.Fragment>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const AccountLimitsTableHeader = ({
{children}
</Text>
)}
{renderExtraInfo && renderExtraInfo()}
{renderExtraInfo?.()}
</th>
);
};
Expand Down
Loading

0 comments on commit 3bc95b7

Please sign in to comment.