Skip to content

Commit

Permalink
Merge branch 'master' into likhith/75850/configure-account-package-fo…
Browse files Browse the repository at this point in the history
…r-ts-migration
  • Loading branch information
likhith-deriv committed Sep 16, 2022
2 parents 11e6967 + 8f6d6f8 commit 32d607b
Show file tree
Hide file tree
Showing 107 changed files with 1,881 additions and 985 deletions.
1 change: 0 additions & 1 deletion .github/workflows/generate_and_push_deriv_api_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ After a new version has been published the action will automatically create a PR
Required GitHub secrets:

- `NPM_ACCESS_TOKEN`: To allow for automatic publishing of new version of `@deriv/api-types`
- `PERSONAL_ACCESS_TOKEN`: (GitHub PAT) To allow the action to authenticate with Git for git operations.
7 changes: 4 additions & 3 deletions .github/workflows/generate_and_push_deriv_api_types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,12 @@ jobs:
git push --set-upstream origin "$package_name" -f
# Get the diff and use this as the PRs body.
pr_body=$(curl "https://diff.intrinsic.com/$package_name/$safe_old_version/$new_version.diff")
diff_url="https://diff.intrinsic.com/$package_name/$safe_old_version/$new_version.diff"
pr_body=$(curl $diff_url)
# Use "gh" to create a PR from the CLI.
sudo apt install gh
gh auth login --with-token <<< ${{ secrets.PERSONAL_ACCESS_TOKEN }}
gh auth login --with-token <<< ${{ github.token }}
gh pr close "$package_name" || true
gh pr create --title "Bump $package_name from $safe_old_version to $new_version" --body "\`\`\`diff $pr_body \`\`\`" --base "master" --head "binary-com:$package_name"
gh pr create --title "Bump $package_name from $safe_old_version to $new_version" --body "Diff url: $diff_url\n \`\`\`diff ${pr_body:0:5000} \`\`\`" --base "master" --head "binary-com:$package_name"
fi
1 change: 0 additions & 1 deletion .github/workflows/push_and_pull_crowdin_translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ This action will automatically extract strings from the Deriv.app repo and uploa
Required GitHub secrets:

- `NPM_ACCESS_TOKEN`: To allow for automatic publishing of new version of `@deriv/api-types`
- `PERSONAL_ACCESS_TOKEN`: (GitHub PAT) To allow the action to authenticate with Git for git operations.
- `CROWDIN_API_TOKEN`: To allow us to download and upload new language files to and from Crowdin.
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module.exports = {
transform: {
'^.+\\.jsx?$': 'babel-jest',
'^.+/es/^.+$': 'babel-jest',
'^.+\\.(ts|tsx)?$': 'ts-jest',
},
testRegex: ['__tests__', '.*.spec.js'],
transformIgnorePatterns: ['/node_modules/(?!react-virtualized).+\\.js$'],
Expand Down
126 changes: 125 additions & 1 deletion package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@types/react-router-dom": "^5.1.6",
"@typescript-eslint/eslint-plugin": "^5.8.0",
"@typescript-eslint/parser": "^5.8.0",
"ts-jest": "^26.4.2",
"babel-polyfill": "^6.26.0",
"chai": "^4.2.0",
"eslint": "^7.18.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,11 @@ const idv_document_data = {
sample_image: '',
},
},
zw: {
national_id: {
new_display_name: 'National ID',
example_format: '081234567F53',
sample_image: getImageLocation('zw_national_identity_card.png'),
},
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ Blockly.Blocks.trade_definition_contracttype = {
colour: Blockly.Colours.Special1.colour,
colourSecondary: Blockly.Colours.Special1.colourSecondary,
colourTertiary: Blockly.Colours.Special1.colourTertiary,
tooltip: localize(
'If the contract type is “Both”, then the Purchase Conditions should include both Rise and Fall using the “Conditional Block"'
),
previousStatement: null,
nextStatement: null,
});
Expand Down
3 changes: 2 additions & 1 deletion packages/bot-skeleton/src/scratch/hooks/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ Blockly.Css.CONTENT = [
'margin: 4px;',
'border-radius: 4px;',
'background: $colour_numPadBackground;',
'color: $colour_numPadText;',
'color: var(--text-general);',
'outline: none;',
'border: 1px solid $colour_numPadBorder;',
'cursor: pointer;',
Expand All @@ -235,6 +235,7 @@ Blockly.Css.CONTENT = [
'margin-top: 10%;',
'width: 80%;',
'height: 80%;',
'filter: invert(1);',
'}',

'.blocklyNumPadButton:active {',
Expand Down
2 changes: 0 additions & 2 deletions packages/cashier/globals.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
declare module '@deriv/components';
declare module '@deriv/p2p';
declare module '@deriv/translations';
declare module '@deriv/shared';
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Text } from '@deriv/components';
import { isMobile } from '@deriv/shared';
import { Localize } from '@deriv/translations';
import { connect } from 'Stores/connect';
import { TRootStore } from 'Types';
import { RootStore } from 'Types';
import './virtual.scss';

type TVirtualProps = RouteComponentProps & {
Expand Down Expand Up @@ -51,7 +51,7 @@ const Virtual = ({ is_dark_mode_on, toggleAccountsDialog }: TVirtualProps) => {
);
};

export default connect(({ ui }: TRootStore) => ({
export default connect(({ ui }: RootStore) => ({
is_dark_mode_on: ui.is_dark_mode_on,
toggleAccountsDialog: ui.toggleAccountsDialog,
}))(withRouter(Virtual));
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Icon, Text } from '@deriv/components';
import { localize, Localize } from '@deriv/translations';
import { formatDate } from '@deriv/shared';
import { connect } from 'Stores/connect';
import { TRootStore } from 'Types';
import { RootStore } from 'Types';

type TAccount = NonNullable<Authorize['account_list']>[0];

Expand Down Expand Up @@ -54,7 +54,7 @@ const CashierLocked = ({

let icon = 'IcCashierLocked';
let title = localize('Cashier is locked');
let message = localize(
let message: string | JSX.Element = localize(
'Your cashier is currently locked. Please contact us via live chat to find out how to unlock it.'
);

Expand Down Expand Up @@ -292,7 +292,7 @@ const CashierLocked = ({
);
};

export default connect(({ client, modules }: TRootStore) => ({
export default connect(({ client, modules }: RootStore) => ({
account_status: client.account_status,
accounts: client.accounts,
current_currency_type: client.current_currency_type,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { DesktopWrapper, Input, Icon, MobileWrapper, Text, useInterval } from '@
import { getCurrencyDisplayCode } from '@deriv/shared';
import { localize, Localize } from '@deriv/translations';
import { connect } from 'Stores/connect';
import { TRootStore, TReactChangeEvent, TReactChildren } from 'Types';
import { RootStore, TReactChangeEvent, TReactChildren } from 'Types';
import './crypto-fiat-converter.scss';

type TTimerProps = {
Expand Down Expand Up @@ -170,7 +170,7 @@ const CryptoFiatConverter = ({
);
};

export default connect(({ modules }: TRootStore) => ({
export default connect(({ modules }: RootStore) => ({
converter_from_amount: modules.cashier.crypto_fiat_converter.converter_from_amount,
converter_from_error: modules.cashier.crypto_fiat_converter.converter_from_error,
converter_to_error: modules.cashier.crypto_fiat_converter.converter_to_error,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { Button, Modal } from '@deriv/components';
import { localize, Localize } from '@deriv/translations';
import { connect } from 'Stores/connect';
import { TRootStore } from 'Types';
import { RootStore } from 'Types';

type TCryptoTransactionsCancelModalProps = {
cancelCryptoTransaction: (selected_crypto_transaction_id: string) => void;
Expand Down Expand Up @@ -45,7 +45,7 @@ const CryptoTransactionsCancelModal = ({
);
};

export default connect(({ modules }: TRootStore) => ({
export default connect(({ modules }: RootStore) => ({
cancelCryptoTransaction: modules.cashier.transaction_history.cancelCryptoTransaction,
hideCryptoTransactionsCancelModal: modules.cashier.transaction_history.hideCryptoTransactionsCancelModal,
is_cancel_modal_visible: modules.cashier.transaction_history.is_crypto_transactions_cancel_modal_visible,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { DataList, Icon, Loading, MobileWrapper, Table, Text } from '@deriv/comp
import { isDesktop, isMobile, routes } from '@deriv/shared';
import { localize, Localize } from '@deriv/translations';
import { connect } from 'Stores/connect';
import { TRootStore, TCryptoTransactionDetails } from 'Types';
import { RootStore, TCryptoTransactionDetails } from 'Types';
import CryptoTransactionsCancelModal from './crypto-transactions-cancel-modal';
import CryptoTransactionsStatusModal from './crypto-transactions-status-modal';
import CryptoTransactionsRenderer from './crypto-transactions-renderer';
Expand Down Expand Up @@ -102,7 +102,7 @@ const CryptoTransactionsHistory = ({
);
};

export default connect(({ client, modules }: TRootStore) => ({
export default connect(({ client, modules }: RootStore) => ({
crypto_transactions: modules.cashier.transaction_history.crypto_transactions,
currency: client.currency,
is_loading: modules.cashier.transaction_history.is_loading,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { epochToMoment, formatMoney, isMobile } from '@deriv/shared';
import { localize, Localize } from '@deriv/translations';
import { getStatus } from 'Constants/transaction-status';
import { connect } from 'Stores/connect';
import { TRootStore, TCryptoTransactionDetails } from 'Types';
import { RootStore, TCryptoTransactionDetails } from 'Types';

type TCryptoTransactionsRendererProps = {
row: TCryptoTransactionDetails;
Expand Down Expand Up @@ -304,7 +304,7 @@ const CryptoTransactionsRenderer = ({
);
};

export default connect(({ client, modules }: TRootStore) => ({
export default connect(({ client, modules }: RootStore) => ({
currency: client.currency,
cancelCryptoTransaction: modules.cashier.transaction_history.cancelCryptoTransaction,
showCryptoTransactionsCancelModal: modules.cashier.transaction_history.showCryptoTransactionsCancelModal,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { Button, Modal } from '@deriv/components';
import { localize } from '@deriv/translations';
import { connect } from 'Stores/connect';
import { TReactMouseEvent, TRootStore } from 'Types';
import { TReactMouseEvent, RootStore } from 'Types';

type TCryptoTransactionsStatusModalProps = {
hideCryptoTransactionsStatusModal: (e: TReactMouseEvent) => void;
Expand Down Expand Up @@ -34,7 +34,7 @@ const CryptoTransactionsStatusModal = ({
);
};

export default connect(({ modules }: TRootStore) => ({
export default connect(({ modules }: RootStore) => ({
hideCryptoTransactionsStatusModal: modules.cashier.transaction_history.hideCryptoTransactionsStatusModal,
is_status_modal_visible: modules.cashier.transaction_history.is_crypto_transactions_status_modal_visible,
selected_crypto_status: modules.cashier.transaction_history.selected_crypto_status,
Expand Down
Loading

0 comments on commit 32d607b

Please sign in to comment.