From f0686ed235a63634297aef0d0d2a86c530a22079 Mon Sep 17 00:00:00 2001 From: kate-deriv Date: Fri, 26 Jul 2024 09:59:42 +0300 Subject: [PATCH 1/8] refactor: remove some tradr params for multipliers and accumulators --- .../accumulators-information.scss | 14 ------ .../accumulators-information.tsx | 43 ------------------- .../AccumulatorsInformation/index.ts | 4 -- .../MultipliersInformation/index.ts | 4 -- .../multipliers-information.scss | 14 ------ .../multipliers-information.tsx | 43 ------------------- .../__tests__/trade-parameters.spec.tsx | 14 +----- .../TradeParameters/trade-parameters.tsx | 4 -- .../__tests__/trade-param-utils.spec.tsx | 8 +--- .../src/AppV2/Utils/trade-params-utils.tsx | 3 +- 10 files changed, 4 insertions(+), 147 deletions(-) delete mode 100644 packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/accumulators-information.scss delete mode 100644 packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/accumulators-information.tsx delete mode 100644 packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/index.ts delete mode 100644 packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/index.ts delete mode 100644 packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/multipliers-information.scss delete mode 100644 packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/multipliers-information.tsx diff --git a/packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/accumulators-information.scss b/packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/accumulators-information.scss deleted file mode 100644 index ab04ec211a56..000000000000 --- a/packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/accumulators-information.scss +++ /dev/null @@ -1,14 +0,0 @@ -.accumulators-info { - &__wrapper { - width: 100%; - } - &__row { - display: flex; - justify-content: space-between; - align-items: center; - padding-block: var(--component-badge-notification-spacing-padding-sm); - } - &__title { - border-bottom: var(--core-borderWidth-75) dotted var(--component-textIcon-normal-default); - } -} diff --git a/packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/accumulators-information.tsx b/packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/accumulators-information.tsx deleted file mode 100644 index 271d00c30a47..000000000000 --- a/packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/accumulators-information.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import React from 'react'; -import { observer } from 'mobx-react'; -import { Localize, localize } from '@deriv/translations'; -import { Money } from '@deriv/components'; -import { Text } from '@deriv-com/quill-ui'; -import { useTraderStore } from 'Stores/useTraderStores'; - -type TAccumulatorsInformationProps = { - is_minimized?: boolean; -}; - -const AccumulatorsInformation = observer(({ is_minimized }: TAccumulatorsInformationProps) => { - const { currency, maximum_payout, maximum_ticks } = useTraderStore(); - const content = [ - { - label: , - value: , - }, - { - label: , - value: `${maximum_ticks || 0} ${maximum_ticks === 1 ? localize('tick') : localize('ticks')}`, - }, - ]; - - if (is_minimized) return null; - - return ( -
- {content.map(({ label, value }) => ( -
- - {label} - - - {value} - -
- ))} -
- ); -}); - -export default AccumulatorsInformation; diff --git a/packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/index.ts b/packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/index.ts deleted file mode 100644 index e5851aa3fbb7..000000000000 --- a/packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import AccumulatorsInformation from './accumulators-information'; -import './accumulators-information.scss'; - -export default AccumulatorsInformation; diff --git a/packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/index.ts b/packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/index.ts deleted file mode 100644 index 78a235c0f249..000000000000 --- a/packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import MultipliersInformation from './multipliers-information'; -import './multipliers-information.scss'; - -export default MultipliersInformation; diff --git a/packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/multipliers-information.scss b/packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/multipliers-information.scss deleted file mode 100644 index 011683551a4f..000000000000 --- a/packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/multipliers-information.scss +++ /dev/null @@ -1,14 +0,0 @@ -.multipliers-info { - &__wrapper { - width: 100%; - } - &__row { - display: flex; - justify-content: space-between; - align-items: center; - padding-block: var(--component-badge-notification-spacing-padding-sm); - } - &__title { - border-bottom: var(--core-borderWidth-75) dotted var(--component-textIcon-normal-default); - } -} diff --git a/packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/multipliers-information.tsx b/packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/multipliers-information.tsx deleted file mode 100644 index e283dcdee727..000000000000 --- a/packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/multipliers-information.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import React from 'react'; -import { observer } from 'mobx-react'; -import { Localize } from '@deriv/translations'; -import { Money } from '@deriv/components'; -import { Text } from '@deriv-com/quill-ui'; -import { useTraderStore } from 'Stores/useTraderStores'; - -type TMultipliersInformationProps = { - is_minimized?: boolean; -}; - -const MultipliersInformation = observer(({ is_minimized }: TMultipliersInformationProps) => { - const { currency, commission, stop_out } = useTraderStore(); - const content = [ - { - label: , - value: commission, - }, - { - label: , - value: stop_out, - }, - ]; - - if (is_minimized) return null; - - return ( -
- {content.map(({ label, value }) => ( -
- - {label} - - - - -
- ))} -
- ); -}); - -export default MultipliersInformation; diff --git a/packages/trader/src/AppV2/Components/TradeParameters/__tests__/trade-parameters.spec.tsx b/packages/trader/src/AppV2/Components/TradeParameters/__tests__/trade-parameters.spec.tsx index 8419f6b1f2a6..228377937df5 100644 --- a/packages/trader/src/AppV2/Components/TradeParameters/__tests__/trade-parameters.spec.tsx +++ b/packages/trader/src/AppV2/Components/TradeParameters/__tests__/trade-parameters.spec.tsx @@ -14,10 +14,8 @@ const TRADE_PARAMS = { BARRIER: 'Barrier', GROWTH_RATE: 'GrowthRate', TAKE_PROFIT: 'TakeProfit', - ACCUMULATORS_INFORMATION: 'AccumulatorsInformation', MULTIPLIER: 'Multiplier', RISK_MANAGEMENT: 'RiskManagement', - MULTIPLIERS_INFORMATION: 'MultipliersInformation', TRADE_TYPE_TABS: 'TradeTypeTabs', STRIKE: 'Strike', PAYOUT_PER_POINT: 'PayoutPerPoint', @@ -31,14 +29,8 @@ jest.mock('../Stake', () => jest.fn(() =>
{TRADE_PA jest.mock('../Barrier', () => jest.fn(() =>
{TRADE_PARAMS.BARRIER}
)); jest.mock('../GrowthRate', () => jest.fn(() =>
{TRADE_PARAMS.GROWTH_RATE}
)); jest.mock('../TakeProfit', () => jest.fn(() =>
{TRADE_PARAMS.TAKE_PROFIT}
)); -jest.mock('../AccumulatorsInformation', () => - jest.fn(() =>
{TRADE_PARAMS.ACCUMULATORS_INFORMATION}
) -); jest.mock('../Multiplier', () => jest.fn(() =>
{TRADE_PARAMS.MULTIPLIER}
)); jest.mock('../RiskManagement', () => jest.fn(() =>
{TRADE_PARAMS.RISK_MANAGEMENT}
)); -jest.mock('../MultipliersInformation', () => - jest.fn(() =>
{TRADE_PARAMS.MULTIPLIERS_INFORMATION}
) -); jest.mock('../TradeTypeTabs', () => jest.fn(() =>
{TRADE_PARAMS.TRADE_TYPE_TABS}
)); jest.mock('../Strike', () => jest.fn(() =>
{TRADE_PARAMS.STRIKE}
)); jest.mock('../PayoutPerPoint', () => jest.fn(() =>
{TRADE_PARAMS.PAYOUT_PER_POINT}
)); @@ -72,8 +64,7 @@ describe('TradeParameters', () => { expect(screen.getByText(TRADE_PARAMS.GROWTH_RATE)).toBeInTheDocument(); expect(screen.getByText(TRADE_PARAMS.STAKE)).toBeInTheDocument(); expect(screen.getByText(TRADE_PARAMS.TAKE_PROFIT)).toBeInTheDocument(); - expect(screen.getByText(TRADE_PARAMS.ACCUMULATORS_INFORMATION)).toBeInTheDocument(); - expect(screen.getAllByTestId(data_test)).toHaveLength(4); + expect(screen.getAllByTestId(data_test)).toHaveLength(3); }); it('should render correct trade params for Vanillas', () => { @@ -106,8 +97,7 @@ describe('TradeParameters', () => { expect(screen.getByText(TRADE_PARAMS.MULTIPLIER)).toBeInTheDocument(); expect(screen.getByText(TRADE_PARAMS.STAKE)).toBeInTheDocument(); expect(screen.getByText(TRADE_PARAMS.RISK_MANAGEMENT)).toBeInTheDocument(); - expect(screen.getByText(TRADE_PARAMS.MULTIPLIERS_INFORMATION)).toBeInTheDocument(); - expect(screen.getAllByTestId(data_test)).toHaveLength(4); + expect(screen.getAllByTestId(data_test)).toHaveLength(3); }); it('should render correct trade params for Rise/Fall', () => { diff --git a/packages/trader/src/AppV2/Components/TradeParameters/trade-parameters.tsx b/packages/trader/src/AppV2/Components/TradeParameters/trade-parameters.tsx index bab8ae4fedda..72915a80f723 100644 --- a/packages/trader/src/AppV2/Components/TradeParameters/trade-parameters.tsx +++ b/packages/trader/src/AppV2/Components/TradeParameters/trade-parameters.tsx @@ -9,10 +9,8 @@ import Stake from './Stake'; import Barrier from './Barrier'; import GrowthRate from './GrowthRate'; import TakeProfit from './TakeProfit'; -import AccumulatorsInformation from './AccumulatorsInformation'; import Multiplier from './Multiplier'; import RiskManagement from './RiskManagement'; -import MultipliersInformation from './MultipliersInformation'; import TradeTypeTabs from './TradeTypeTabs'; import Strike from './Strike'; import PayoutPerPoint from './PayoutPerPoint'; @@ -48,8 +46,6 @@ const TradeParameters = observer(({ is_minimized }: TTradeParametersProps) => { {isVisible('take_profit') && } {isVisible('risk_management') && } {/* {isVisible('expiration') && } */} - {isVisible('accu_info_display') && } - {isVisible('mult_info_display') && }
); }); diff --git a/packages/trader/src/AppV2/Utils/__tests__/trade-param-utils.spec.tsx b/packages/trader/src/AppV2/Utils/__tests__/trade-param-utils.spec.tsx index 3c22d1ab9b88..c9acc0268846 100644 --- a/packages/trader/src/AppV2/Utils/__tests__/trade-param-utils.spec.tsx +++ b/packages/trader/src/AppV2/Utils/__tests__/trade-param-utils.spec.tsx @@ -7,12 +7,7 @@ describe('getTradeParams', () => { }); it('should return correct array with keys for Multipliers if symbol does not start with "cry"', () => { - expect(getTradeParams()[TRADE_TYPES.MULTIPLIER]).toEqual([ - 'multiplier', - 'stake', - 'risk_management', - 'mult_info_display', - ]); + expect(getTradeParams()[TRADE_TYPES.MULTIPLIER]).toEqual(['multiplier', 'stake', 'risk_management']); }); it('should return correct array with keys for Multipliers if symbol starts with "cry"', () => { @@ -21,7 +16,6 @@ describe('getTradeParams', () => { 'stake', 'risk_management', 'expiration', - 'mult_info_display', ]); }); }); diff --git a/packages/trader/src/AppV2/Utils/trade-params-utils.tsx b/packages/trader/src/AppV2/Utils/trade-params-utils.tsx index 4cfc33bc6f0b..1b8b424949d3 100644 --- a/packages/trader/src/AppV2/Utils/trade-params-utils.tsx +++ b/packages/trader/src/AppV2/Utils/trade-params-utils.tsx @@ -8,13 +8,12 @@ export const getTradeParams = (symbol?: string) => ({ [TRADE_TYPES.MATCH_DIFF]: ['last_digit', 'duration', 'stake'], [TRADE_TYPES.EVEN_ODD]: ['duration', 'stake'], [TRADE_TYPES.OVER_UNDER]: ['last_digit', 'duration', 'stake'], - [TRADE_TYPES.ACCUMULATOR]: ['growth_rate', 'stake', 'take_profit', 'accu_info_display'], + [TRADE_TYPES.ACCUMULATOR]: ['growth_rate', 'stake', 'take_profit'], [TRADE_TYPES.MULTIPLIER]: [ 'multiplier', 'stake', 'risk_management', ...(shouldShowExpiration(symbol) ? ['expiration'] : []), - 'mult_info_display', ], [TRADE_TYPES.TURBOS.LONG]: ['trade_type_tabs', 'duration', 'payout_per_point', 'stake', 'take_profit'], [TRADE_TYPES.TURBOS.SHORT]: ['trade_type_tabs', 'duration', 'payout_per_point', 'stake', 'take_profit'], From a3cc84a153e91c4d243179d0efa756cb5f2da9ac Mon Sep 17 00:00:00 2001 From: kate-deriv Date: Fri, 26 Jul 2024 10:59:07 +0300 Subject: [PATCH 2/8] refactor: update quill and refactor purchase btn --- package-lock.json | 162 +++++++++++++++++- packages/account/package.json | 2 +- packages/core/package.json | 2 +- packages/trader/package.json | 2 +- .../purchase-button-content.tsx | 27 ++- .../last-digit-prediction.tsx | 3 +- 6 files changed, 178 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index 22c0862b23f8..497f96bcc57f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "@datadog/browser-rum": "^5.11.0", "@deriv-com/analytics": "1.10.0", "@deriv-com/quill-tokens": "^2.0.4", - "@deriv-com/quill-ui": "1.13.22", + "@deriv-com/quill-ui": "1.13.23", "@deriv-com/translations": "1.3.4", "@deriv-com/ui": "1.29.9", "@deriv-com/utils": "^0.0.25", @@ -2959,9 +2959,9 @@ } }, "node_modules/@deriv-com/quill-ui": { - "version": "1.13.22", - "resolved": "https://registry.npmjs.org/@deriv-com/quill-ui/-/quill-ui-1.13.22.tgz", - "integrity": "sha512-1xUmNkS898TxfmnepYBLFVBMoIvu5fGlcY4xdXX1C2xw3Y1+6RP8xxqVIqt/paJAAbIq3WStp/CM6BZPyWvMWg==", + "version": "1.13.23", + "resolved": "https://registry.npmjs.org/@deriv-com/quill-ui/-/quill-ui-1.13.23.tgz", + "integrity": "sha512-jzg2z/3u0A7mLcEbrw8EZBpyE005x1xAyeIccER8xKY8ejmu9cMIFl8pe6UlQGUNBHpL2GFowTXY0kO4CZn+/Q==", "dependencies": { "@deriv-com/quill-tokens": "^2.0.8", "@deriv/quill-icons": "^1.22.10", @@ -3897,6 +3897,7 @@ }, "node_modules/@isaacs/string-locale-compare": { "version": "1.1.0", + "dev": true, "license": "ISC" }, "node_modules/@istanbuljs/load-nyc-config": { @@ -7348,6 +7349,7 @@ }, "node_modules/@npmcli/arborist": { "version": "5.3.0", + "dev": true, "license": "ISC", "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", @@ -7394,6 +7396,7 @@ }, "node_modules/@npmcli/arborist/node_modules/hosted-git-info": { "version": "5.2.1", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^7.5.1" @@ -7404,6 +7407,7 @@ }, "node_modules/@npmcli/arborist/node_modules/npm-package-arg": { "version": "9.1.2", + "dev": true, "license": "ISC", "dependencies": { "hosted-git-info": "^5.0.0", @@ -7417,6 +7421,7 @@ }, "node_modules/@npmcli/arborist/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -7430,6 +7435,7 @@ }, "node_modules/@npmcli/arborist/node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -7440,6 +7446,7 @@ }, "node_modules/@npmcli/fs": { "version": "2.1.2", + "dev": true, "license": "ISC", "dependencies": { "@gar/promisify": "^1.1.3", @@ -7451,6 +7458,7 @@ }, "node_modules/@npmcli/fs/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -7461,6 +7469,7 @@ }, "node_modules/@npmcli/fs/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -7474,6 +7483,7 @@ }, "node_modules/@npmcli/git": { "version": "3.0.2", + "dev": true, "license": "ISC", "dependencies": { "@npmcli/promise-spawn": "^3.0.0", @@ -7492,6 +7502,7 @@ }, "node_modules/@npmcli/git/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -7505,6 +7516,7 @@ }, "node_modules/@npmcli/git/node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -7515,6 +7527,7 @@ }, "node_modules/@npmcli/installed-package-contents": { "version": "1.0.7", + "dev": true, "license": "ISC", "dependencies": { "npm-bundled": "^1.1.1", @@ -7529,6 +7542,7 @@ }, "node_modules/@npmcli/map-workspaces": { "version": "2.0.4", + "dev": true, "license": "ISC", "dependencies": { "@npmcli/name-from-folder": "^1.0.1", @@ -7542,6 +7556,7 @@ }, "node_modules/@npmcli/map-workspaces/node_modules/brace-expansion": { "version": "2.0.1", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -7549,6 +7564,7 @@ }, "node_modules/@npmcli/map-workspaces/node_modules/glob": { "version": "8.0.3", + "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -7566,6 +7582,7 @@ }, "node_modules/@npmcli/map-workspaces/node_modules/minimatch": { "version": "5.1.1", + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" @@ -7576,6 +7593,7 @@ }, "node_modules/@npmcli/metavuln-calculator": { "version": "3.1.1", + "dev": true, "license": "ISC", "dependencies": { "cacache": "^16.0.0", @@ -7589,6 +7607,7 @@ }, "node_modules/@npmcli/metavuln-calculator/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -7599,6 +7618,7 @@ }, "node_modules/@npmcli/metavuln-calculator/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -7612,6 +7632,7 @@ }, "node_modules/@npmcli/move-file": { "version": "2.0.1", + "dev": true, "license": "MIT", "dependencies": { "mkdirp": "^1.0.4", @@ -7623,10 +7644,12 @@ }, "node_modules/@npmcli/name-from-folder": { "version": "1.0.1", + "dev": true, "license": "ISC" }, "node_modules/@npmcli/node-gyp": { "version": "2.0.0", + "dev": true, "license": "ISC", "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" @@ -7634,6 +7657,7 @@ }, "node_modules/@npmcli/package-json": { "version": "2.0.0", + "dev": true, "license": "ISC", "dependencies": { "json-parse-even-better-errors": "^2.3.1" @@ -7644,6 +7668,7 @@ }, "node_modules/@npmcli/promise-spawn": { "version": "3.0.0", + "dev": true, "license": "ISC", "dependencies": { "infer-owner": "^1.0.4" @@ -7654,6 +7679,7 @@ }, "node_modules/@npmcli/run-script": { "version": "4.2.1", + "dev": true, "license": "ISC", "dependencies": { "@npmcli/node-gyp": "^2.0.0", @@ -20690,6 +20716,7 @@ }, "node_modules/abbrev": { "version": "1.1.1", + "dev": true, "license": "ISC" }, "node_modules/accepts": { @@ -20810,6 +20837,7 @@ }, "node_modules/agentkeepalive": { "version": "4.2.1", + "dev": true, "license": "MIT", "dependencies": { "debug": "^4.1.0", @@ -21029,6 +21057,7 @@ }, "node_modules/are-we-there-yet": { "version": "3.0.1", + "dev": true, "license": "ISC", "dependencies": { "delegates": "^1.0.0", @@ -22398,6 +22427,7 @@ }, "node_modules/bin-links": { "version": "3.0.3", + "dev": true, "license": "ISC", "dependencies": { "cmd-shim": "^5.0.0", @@ -22413,6 +22443,7 @@ }, "node_modules/bin-links/node_modules/npm-normalize-package-bin": { "version": "2.0.0", + "dev": true, "license": "ISC", "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" @@ -22420,6 +22451,7 @@ }, "node_modules/bin-links/node_modules/write-file-atomic": { "version": "4.0.2", + "dev": true, "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4", @@ -23016,6 +23048,7 @@ }, "node_modules/builtins": { "version": "5.0.1", + "dev": true, "license": "MIT", "dependencies": { "semver": "^7.0.0" @@ -23023,6 +23056,7 @@ }, "node_modules/builtins/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -23033,6 +23067,7 @@ }, "node_modules/builtins/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -23130,6 +23165,7 @@ }, "node_modules/cacache": { "version": "16.1.3", + "dev": true, "license": "ISC", "dependencies": { "@npmcli/fs": "^2.1.0", @@ -23157,6 +23193,7 @@ }, "node_modules/cacache/node_modules/brace-expansion": { "version": "2.0.1", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -23164,6 +23201,7 @@ }, "node_modules/cacache/node_modules/glob": { "version": "8.0.3", + "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -23181,6 +23219,7 @@ }, "node_modules/cacache/node_modules/minimatch": { "version": "5.1.1", + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" @@ -23959,6 +23998,7 @@ }, "node_modules/cmd-shim": { "version": "5.0.0", + "dev": true, "license": "ISC", "dependencies": { "mkdirp-infer-owner": "^2.0.0" @@ -24079,6 +24119,7 @@ }, "node_modules/common-ancestor-path": { "version": "1.0.1", + "dev": true, "license": "ISC" }, "node_modules/common-tags": { @@ -26310,6 +26351,7 @@ }, "node_modules/debuglog": { "version": "1.0.1", + "dev": true, "license": "MIT", "engines": { "node": "*" @@ -27070,6 +27112,7 @@ }, "node_modules/dezalgo": { "version": "1.0.4", + "dev": true, "license": "ISC", "dependencies": { "asap": "^2.0.0", @@ -27858,6 +27901,7 @@ }, "node_modules/err-code": { "version": "2.0.3", + "dev": true, "license": "MIT" }, "node_modules/errno": { @@ -31292,6 +31336,7 @@ }, "node_modules/gauge": { "version": "4.0.4", + "dev": true, "license": "ISC", "dependencies": { "aproba": "^1.0.3 || ^2.0.0", @@ -32477,6 +32522,7 @@ }, "node_modules/hosted-git-info": { "version": "4.1.0", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -32487,6 +32533,7 @@ }, "node_modules/hosted-git-info/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -32894,7 +32941,8 @@ "node_modules/http-cache-semantics": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", + "dev": true }, "node_modules/http-deceiver": { "version": "1.2.7", @@ -33120,6 +33168,7 @@ }, "node_modules/humanize-ms": { "version": "1.2.1", + "dev": true, "license": "MIT", "dependencies": { "ms": "^2.0.0" @@ -33285,6 +33334,7 @@ }, "node_modules/ignore-walk": { "version": "5.0.1", + "dev": true, "license": "ISC", "dependencies": { "minimatch": "^5.0.1" @@ -33295,6 +33345,7 @@ }, "node_modules/ignore-walk/node_modules/brace-expansion": { "version": "2.0.1", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -33302,6 +33353,7 @@ }, "node_modules/ignore-walk/node_modules/minimatch": { "version": "5.1.1", + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" @@ -33448,6 +33500,7 @@ }, "node_modules/init-package-json": { "version": "3.0.2", + "dev": true, "license": "ISC", "dependencies": { "npm-package-arg": "^9.0.1", @@ -33464,6 +33517,7 @@ }, "node_modules/init-package-json/node_modules/hosted-git-info": { "version": "5.2.1", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^7.5.1" @@ -33474,6 +33528,7 @@ }, "node_modules/init-package-json/node_modules/npm-package-arg": { "version": "9.1.2", + "dev": true, "license": "ISC", "dependencies": { "hosted-git-info": "^5.0.0", @@ -33487,6 +33542,7 @@ }, "node_modules/init-package-json/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -33500,6 +33556,7 @@ }, "node_modules/init-package-json/node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -34006,6 +34063,7 @@ }, "node_modules/is-lambda": { "version": "1.0.1", + "dev": true, "license": "MIT" }, "node_modules/is-lite": { @@ -38088,6 +38146,7 @@ }, "node_modules/json-stringify-nice": { "version": "1.1.4", + "dev": true, "license": "ISC", "funding": { "url": "https://github.com/sponsors/isaacs" @@ -38202,10 +38261,12 @@ }, "node_modules/just-diff": { "version": "5.1.1", + "dev": true, "license": "MIT" }, "node_modules/just-diff-apply": { "version": "5.4.1", + "dev": true, "license": "MIT" }, "node_modules/just-extend": { @@ -38461,6 +38522,7 @@ }, "node_modules/libnpmaccess": { "version": "6.0.4", + "dev": true, "license": "ISC", "dependencies": { "aproba": "^2.0.0", @@ -38474,6 +38536,7 @@ }, "node_modules/libnpmaccess/node_modules/hosted-git-info": { "version": "5.2.1", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^7.5.1" @@ -38484,6 +38547,7 @@ }, "node_modules/libnpmaccess/node_modules/npm-package-arg": { "version": "9.1.2", + "dev": true, "license": "ISC", "dependencies": { "hosted-git-info": "^5.0.0", @@ -38497,6 +38561,7 @@ }, "node_modules/libnpmaccess/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -38510,6 +38575,7 @@ }, "node_modules/libnpmaccess/node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -38520,6 +38586,7 @@ }, "node_modules/libnpmpublish": { "version": "6.0.5", + "dev": true, "license": "ISC", "dependencies": { "normalize-package-data": "^4.0.0", @@ -38534,6 +38601,7 @@ }, "node_modules/libnpmpublish/node_modules/hosted-git-info": { "version": "5.2.1", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^7.5.1" @@ -38544,6 +38612,7 @@ }, "node_modules/libnpmpublish/node_modules/normalize-package-data": { "version": "4.0.1", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "hosted-git-info": "^5.0.0", @@ -38557,6 +38626,7 @@ }, "node_modules/libnpmpublish/node_modules/npm-package-arg": { "version": "9.1.2", + "dev": true, "license": "ISC", "dependencies": { "hosted-git-info": "^5.0.0", @@ -38570,6 +38640,7 @@ }, "node_modules/libnpmpublish/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -38583,6 +38654,7 @@ }, "node_modules/libnpmpublish/node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -39219,6 +39291,7 @@ }, "node_modules/lru-cache": { "version": "7.14.1", + "dev": true, "license": "ISC", "engines": { "node": ">=12" @@ -39259,6 +39332,7 @@ }, "node_modules/make-fetch-happen": { "version": "10.2.1", + "dev": true, "license": "ISC", "dependencies": { "agentkeepalive": "^4.2.1", @@ -39858,6 +39932,7 @@ }, "node_modules/minipass-fetch": { "version": "2.1.2", + "dev": true, "license": "MIT", "dependencies": { "minipass": "^3.1.6", @@ -39883,6 +39958,7 @@ }, "node_modules/minipass-json-stream": { "version": "1.0.1", + "dev": true, "license": "MIT", "dependencies": { "jsonparse": "^1.3.1", @@ -39901,6 +39977,7 @@ }, "node_modules/minipass-sized": { "version": "1.0.3", + "dev": true, "license": "ISC", "dependencies": { "minipass": "^3.0.0" @@ -40023,6 +40100,7 @@ }, "node_modules/mkdirp-infer-owner": { "version": "2.0.0", + "dev": true, "license": "ISC", "dependencies": { "chownr": "^2.0.0", @@ -40237,6 +40315,7 @@ }, "node_modules/mute-stream": { "version": "0.0.8", + "dev": true, "license": "ISC" }, "node_modules/mz": { @@ -40491,6 +40570,7 @@ }, "node_modules/node-gyp": { "version": "9.3.0", + "dev": true, "license": "MIT", "dependencies": { "env-paths": "^2.2.0", @@ -40523,6 +40603,7 @@ }, "node_modules/node-gyp/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -40533,6 +40614,7 @@ }, "node_modules/node-gyp/node_modules/nopt": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "abbrev": "^1.0.0" @@ -40546,6 +40628,7 @@ }, "node_modules/node-gyp/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -40706,6 +40789,7 @@ }, "node_modules/nopt": { "version": "5.0.0", + "dev": true, "license": "ISC", "dependencies": { "abbrev": "1" @@ -40719,6 +40803,7 @@ }, "node_modules/normalize-package-data": { "version": "3.0.3", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "hosted-git-info": "^4.0.1", @@ -40732,6 +40817,7 @@ }, "node_modules/normalize-package-data/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -40742,6 +40828,7 @@ }, "node_modules/normalize-package-data/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -40937,6 +41024,7 @@ }, "node_modules/npm-bundled": { "version": "1.1.2", + "dev": true, "license": "ISC", "dependencies": { "npm-normalize-package-bin": "^1.0.1" @@ -40944,6 +41032,7 @@ }, "node_modules/npm-install-checks": { "version": "5.0.0", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "semver": "^7.1.1" @@ -40954,6 +41043,7 @@ }, "node_modules/npm-install-checks/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -40964,6 +41054,7 @@ }, "node_modules/npm-install-checks/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -40977,10 +41068,12 @@ }, "node_modules/npm-normalize-package-bin": { "version": "1.0.1", + "dev": true, "license": "ISC" }, "node_modules/npm-package-arg": { "version": "8.1.1", + "dev": true, "license": "ISC", "dependencies": { "hosted-git-info": "^3.0.6", @@ -40993,10 +41086,12 @@ }, "node_modules/npm-package-arg/node_modules/builtins": { "version": "1.0.3", + "dev": true, "license": "MIT" }, "node_modules/npm-package-arg/node_modules/hosted-git-info": { "version": "3.0.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -41007,6 +41102,7 @@ }, "node_modules/npm-package-arg/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -41017,6 +41113,7 @@ }, "node_modules/npm-package-arg/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -41030,6 +41127,7 @@ }, "node_modules/npm-package-arg/node_modules/validate-npm-package-name": { "version": "3.0.0", + "dev": true, "license": "ISC", "dependencies": { "builtins": "^1.0.3" @@ -41037,6 +41135,7 @@ }, "node_modules/npm-packlist": { "version": "5.1.3", + "dev": true, "license": "ISC", "dependencies": { "glob": "^8.0.1", @@ -41053,6 +41152,7 @@ }, "node_modules/npm-packlist/node_modules/brace-expansion": { "version": "2.0.1", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -41060,6 +41160,7 @@ }, "node_modules/npm-packlist/node_modules/glob": { "version": "8.0.3", + "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -41077,6 +41178,7 @@ }, "node_modules/npm-packlist/node_modules/minimatch": { "version": "5.1.1", + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" @@ -41087,6 +41189,7 @@ }, "node_modules/npm-packlist/node_modules/npm-bundled": { "version": "2.0.1", + "dev": true, "license": "ISC", "dependencies": { "npm-normalize-package-bin": "^2.0.0" @@ -41097,6 +41200,7 @@ }, "node_modules/npm-packlist/node_modules/npm-normalize-package-bin": { "version": "2.0.0", + "dev": true, "license": "ISC", "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" @@ -41104,6 +41208,7 @@ }, "node_modules/npm-pick-manifest": { "version": "7.0.2", + "dev": true, "license": "ISC", "dependencies": { "npm-install-checks": "^5.0.0", @@ -41117,6 +41222,7 @@ }, "node_modules/npm-pick-manifest/node_modules/hosted-git-info": { "version": "5.2.1", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^7.5.1" @@ -41127,6 +41233,7 @@ }, "node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin": { "version": "2.0.0", + "dev": true, "license": "ISC", "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" @@ -41134,6 +41241,7 @@ }, "node_modules/npm-pick-manifest/node_modules/npm-package-arg": { "version": "9.1.2", + "dev": true, "license": "ISC", "dependencies": { "hosted-git-info": "^5.0.0", @@ -41147,6 +41255,7 @@ }, "node_modules/npm-pick-manifest/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -41160,6 +41269,7 @@ }, "node_modules/npm-pick-manifest/node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -41170,6 +41280,7 @@ }, "node_modules/npm-registry-fetch": { "version": "13.3.1", + "dev": true, "license": "ISC", "dependencies": { "make-fetch-happen": "^10.0.6", @@ -41186,6 +41297,7 @@ }, "node_modules/npm-registry-fetch/node_modules/hosted-git-info": { "version": "5.2.1", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^7.5.1" @@ -41196,6 +41308,7 @@ }, "node_modules/npm-registry-fetch/node_modules/npm-package-arg": { "version": "9.1.2", + "dev": true, "license": "ISC", "dependencies": { "hosted-git-info": "^5.0.0", @@ -41209,6 +41322,7 @@ }, "node_modules/npm-registry-fetch/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -41222,6 +41336,7 @@ }, "node_modules/npm-registry-fetch/node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -43440,6 +43555,7 @@ }, "node_modules/npmlog": { "version": "6.0.2", + "dev": true, "license": "ISC", "dependencies": { "are-we-there-yet": "^3.0.0", @@ -44427,6 +44543,7 @@ }, "node_modules/pacote": { "version": "13.6.2", + "dev": true, "license": "ISC", "dependencies": { "@npmcli/git": "^3.0.0", @@ -44460,6 +44577,7 @@ }, "node_modules/pacote/node_modules/hosted-git-info": { "version": "5.2.1", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^7.5.1" @@ -44470,6 +44588,7 @@ }, "node_modules/pacote/node_modules/npm-package-arg": { "version": "9.1.2", + "dev": true, "license": "ISC", "dependencies": { "hosted-git-info": "^5.0.0", @@ -44483,6 +44602,7 @@ }, "node_modules/pacote/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -44496,6 +44616,7 @@ }, "node_modules/pacote/node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -44588,6 +44709,7 @@ }, "node_modules/parse-conflict-json": { "version": "2.0.2", + "dev": true, "license": "ISC", "dependencies": { "json-parse-even-better-errors": "^2.3.1", @@ -46744,6 +46866,7 @@ }, "node_modules/proc-log": { "version": "2.0.1", + "dev": true, "license": "ISC", "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" @@ -46779,6 +46902,7 @@ }, "node_modules/promise-all-reject-late": { "version": "1.0.1", + "dev": true, "license": "ISC", "funding": { "url": "https://github.com/sponsors/isaacs" @@ -46786,6 +46910,7 @@ }, "node_modules/promise-call-limit": { "version": "1.0.1", + "dev": true, "license": "ISC", "funding": { "url": "https://github.com/sponsors/isaacs" @@ -46802,6 +46927,7 @@ }, "node_modules/promise-retry": { "version": "2.0.1", + "dev": true, "license": "MIT", "dependencies": { "err-code": "^2.0.2", @@ -46861,6 +46987,7 @@ }, "node_modules/promzard": { "version": "0.3.0", + "dev": true, "license": "ISC", "dependencies": { "read": "1" @@ -48230,6 +48357,7 @@ }, "node_modules/read": { "version": "1.0.7", + "dev": true, "license": "ISC", "dependencies": { "mute-stream": "~0.0.4" @@ -48240,6 +48368,7 @@ }, "node_modules/read-cmd-shim": { "version": "3.0.1", + "dev": true, "license": "ISC", "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" @@ -48247,6 +48376,7 @@ }, "node_modules/read-package-json": { "version": "5.0.2", + "dev": true, "license": "ISC", "dependencies": { "glob": "^8.0.1", @@ -48260,6 +48390,7 @@ }, "node_modules/read-package-json-fast": { "version": "2.0.3", + "dev": true, "license": "ISC", "dependencies": { "json-parse-even-better-errors": "^2.3.0", @@ -48271,6 +48402,7 @@ }, "node_modules/read-package-json/node_modules/brace-expansion": { "version": "2.0.1", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -48278,6 +48410,7 @@ }, "node_modules/read-package-json/node_modules/glob": { "version": "8.0.3", + "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -48295,6 +48428,7 @@ }, "node_modules/read-package-json/node_modules/hosted-git-info": { "version": "5.2.1", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^7.5.1" @@ -48305,6 +48439,7 @@ }, "node_modules/read-package-json/node_modules/minimatch": { "version": "5.1.1", + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" @@ -48315,6 +48450,7 @@ }, "node_modules/read-package-json/node_modules/normalize-package-data": { "version": "4.0.1", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "hosted-git-info": "^5.0.0", @@ -48328,6 +48464,7 @@ }, "node_modules/read-package-json/node_modules/npm-normalize-package-bin": { "version": "2.0.0", + "dev": true, "license": "ISC", "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" @@ -48335,6 +48472,7 @@ }, "node_modules/read-package-json/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -48348,6 +48486,7 @@ }, "node_modules/read-package-json/node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -48676,6 +48815,7 @@ }, "node_modules/readdir-scoped-modules": { "version": "1.1.0", + "dev": true, "license": "ISC", "dependencies": { "debuglog": "^1.0.1", @@ -51413,6 +51553,7 @@ }, "node_modules/smart-buffer": { "version": "4.2.0", + "dev": true, "license": "MIT", "engines": { "node": ">= 6.0.0", @@ -51636,6 +51777,7 @@ }, "node_modules/socks": { "version": "2.7.1", + "dev": true, "license": "MIT", "dependencies": { "ip": "^2.0.0", @@ -51648,6 +51790,7 @@ }, "node_modules/socks-proxy-agent": { "version": "7.0.0", + "dev": true, "license": "MIT", "dependencies": { "agent-base": "^6.0.2", @@ -51896,6 +52039,7 @@ }, "node_modules/ssri": { "version": "9.0.1", + "dev": true, "license": "ISC", "dependencies": { "minipass": "^3.1.1" @@ -53844,7 +53988,8 @@ }, "node_modules/text-table": { "version": "0.2.0", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/thenify": { "version": "3.3.1", @@ -54092,6 +54237,7 @@ }, "node_modules/treeverse": { "version": "2.0.0", + "dev": true, "license": "ISC", "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" @@ -54754,6 +54900,7 @@ }, "node_modules/unique-filename": { "version": "2.0.1", + "dev": true, "license": "ISC", "dependencies": { "unique-slug": "^3.0.0" @@ -54764,6 +54911,7 @@ }, "node_modules/unique-slug": { "version": "3.0.0", + "dev": true, "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4" @@ -55282,6 +55430,7 @@ }, "node_modules/validate-npm-package-name": { "version": "4.0.0", + "dev": true, "license": "ISC", "dependencies": { "builtins": "^5.0.0" @@ -55390,6 +55539,7 @@ }, "node_modules/walk-up-path": { "version": "1.0.0", + "dev": true, "license": "ISC" }, "node_modules/walker": { diff --git a/packages/account/package.json b/packages/account/package.json index 989f9a68f5a0..65eb08576dd2 100644 --- a/packages/account/package.json +++ b/packages/account/package.json @@ -35,7 +35,7 @@ "@deriv-com/utils": "^0.0.25", "@deriv-com/ui": "1.29.9", "@deriv/api": "^1.0.0", - "@deriv-com/quill-ui": "1.13.22", + "@deriv-com/quill-ui": "1.13.23", "@deriv/components": "^1.0.0", "@deriv/hooks": "^1.0.0", "@deriv/integration": "1.0.0", diff --git a/packages/core/package.json b/packages/core/package.json index 13c1c3a7294d..785670632628 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -98,7 +98,7 @@ "@datadog/browser-rum": "^5.11.0", "@deriv-com/analytics": "1.10.0", "@deriv-com/quill-tokens": "^2.0.4", - "@deriv-com/quill-ui": "1.13.22", + "@deriv-com/quill-ui": "1.13.23", "@deriv-com/translations": "1.3.4", "@deriv-com/ui": "1.29.9", "@deriv-com/utils": "^0.0.25", diff --git a/packages/trader/package.json b/packages/trader/package.json index bc3db2b28b1a..19979a0dff6d 100644 --- a/packages/trader/package.json +++ b/packages/trader/package.json @@ -90,7 +90,7 @@ "@cloudflare/stream-react": "^1.9.1", "@deriv-com/analytics": "1.10.0", "@deriv-com/quill-tokens": "^2.0.4", - "@deriv-com/quill-ui": "1.13.22", + "@deriv-com/quill-ui": "1.13.23", "@deriv-com/utils": "^0.0.25", "@deriv-com/ui": "1.29.9", "@deriv/api-types": "1.0.172", diff --git a/packages/trader/src/AppV2/Components/PurchaseButton/purchase-button-content.tsx b/packages/trader/src/AppV2/Components/PurchaseButton/purchase-button-content.tsx index 19c091b71d28..2a50c38b8e80 100644 --- a/packages/trader/src/AppV2/Components/PurchaseButton/purchase-button-content.tsx +++ b/packages/trader/src/AppV2/Components/PurchaseButton/purchase-button-content.tsx @@ -32,19 +32,28 @@ const PurchaseButtonContent = ({ is_vanilla_fx, is_reverse, }: TPurchaseButtonContent) => { - const localized_basis = getLocalizedBasis(); + const { + current_stake: localized_current_stake, + max_payout, + payout, + payout_per_point, + payout_per_pip, + stake, + } = getLocalizedBasis(); const getAmount = () => { - if (is_multiplier) return info.stake; - if (is_accumulator) return has_open_accu_contract ? Number(current_stake) : info.maximum_payout; - return info?.obj_contract_basis?.value; + const { stake, maximum_payout, obj_contract_basis } = info; + + if (is_multiplier) return stake; + if (is_accumulator) return has_open_accu_contract ? Number(current_stake) : maximum_payout; + return obj_contract_basis?.value; }; const getTextBasis = () => { - if (is_turbos || (is_vanilla && !is_vanilla_fx)) return localized_basis.payout_per_point; - if (is_vanilla_fx) return localized_basis.payout_per_pip; - if (is_multiplier) return localized_basis.stake; - if (is_accumulator) return has_open_accu_contract ? localized_basis.current_stake : localized_basis.max_payout; - return localized_basis.payout; + if (is_turbos || (is_vanilla && !is_vanilla_fx)) return payout_per_point; + if (is_vanilla_fx) return payout_per_pip; + if (is_multiplier) return stake; + if (is_accumulator) return has_open_accu_contract ? localized_current_stake : max_payout; + return payout; }; const text_basis = getTextBasis(); diff --git a/packages/trader/src/AppV2/Components/TradeParameters/LastDigitPrediction/last-digit-prediction.tsx b/packages/trader/src/AppV2/Components/TradeParameters/LastDigitPrediction/last-digit-prediction.tsx index ba015a0820b4..4c0a8dfe4f5b 100644 --- a/packages/trader/src/AppV2/Components/TradeParameters/LastDigitPrediction/last-digit-prediction.tsx +++ b/packages/trader/src/AppV2/Components/TradeParameters/LastDigitPrediction/last-digit-prediction.tsx @@ -31,7 +31,6 @@ const LastDigitPrediction = observer(({ is_minimized, is_stats_mode }: TLastDigi }; const onActionSheetClose = () => { setIsOpen(false); - //TODO: check if we need these 2 resets below after latest Quill Action sheet changes will be in our branch setSelectedDigit(last_digit); }; @@ -47,7 +46,7 @@ const LastDigitPrediction = observer(({ is_minimized, is_stats_mode }: TLastDigi key={`last-digit-prediction${is_minimized ? '-minimized' : ''}`} /> } - value={last_digit.toString()} // TODO: remove toString after TextField supports a numeric 0 value in quill-ui + value={last_digit} className={clsx('trade-params__option', 'trade-params__option--minimized')} onClick={() => setIsOpen(true)} /> From e0f890bfb4fccec453c71f4115337c11ed7d0aa5 Mon Sep 17 00:00:00 2001 From: kate-deriv Date: Fri, 26 Jul 2024 11:56:33 +0300 Subject: [PATCH 3/8] refactor: allow equals --- .../__tests__/allow-equals.spec.tsx | 7 +- .../AllowEquals/allow-equals-header.tsx | 26 ------- .../AllowEquals/allow-equals.scss | 9 +-- .../AllowEquals/allow-equals.tsx | 72 +++++-------------- 4 files changed, 21 insertions(+), 93 deletions(-) delete mode 100644 packages/trader/src/AppV2/Components/TradeParameters/AllowEquals/allow-equals-header.tsx diff --git a/packages/trader/src/AppV2/Components/TradeParameters/AllowEquals/__tests__/allow-equals.spec.tsx b/packages/trader/src/AppV2/Components/TradeParameters/AllowEquals/__tests__/allow-equals.spec.tsx index d9b5e8d33a02..9e9246e20db3 100644 --- a/packages/trader/src/AppV2/Components/TradeParameters/AllowEquals/__tests__/allow-equals.spec.tsx +++ b/packages/trader/src/AppV2/Components/TradeParameters/AllowEquals/__tests__/allow-equals.spec.tsx @@ -76,17 +76,14 @@ describe('AllowEquals', () => { expect(screen.getByRole('dialog')).toHaveAttribute('data-state', 'open'); }); - it('should call onChange function if user opens ActionSheet, changes ToggleSwitch and clicks on "Save" button', () => { + it('should call onChange function if user opens ActionSheet and clicks on ToggleSwitch', () => { render(mockAllowEquals()); userEvent.click(screen.getByRole('textbox')); - const [toggle_switch_button, save_button] = screen.getAllByRole('button'); - expect(toggle_switch_button).toHaveAttribute('aria-pressed', 'false'); + const toggle_switch_button = screen.getByRole('button'); userEvent.click(toggle_switch_button); - expect(toggle_switch_button).toHaveAttribute('aria-pressed', 'true'); - userEvent.click(save_button); expect(default_mock_store.modules.trade.onChange).toBeCalled(); }); }); diff --git a/packages/trader/src/AppV2/Components/TradeParameters/AllowEquals/allow-equals-header.tsx b/packages/trader/src/AppV2/Components/TradeParameters/AllowEquals/allow-equals-header.tsx deleted file mode 100644 index b545c11ec624..000000000000 --- a/packages/trader/src/AppV2/Components/TradeParameters/AllowEquals/allow-equals-header.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from 'react'; -import { ActionSheet } from '@deriv-com/quill-ui'; -import { LabelPairedArrowLeftMdRegularIcon, LabelPairedCircleInfoMdRegularIcon } from '@deriv/quill-icons'; -import { Localize } from '@deriv/translations'; - -type TAllowEqualsProps = { - current_index: number; - onNextClick: () => void; - onPrevClick: () => void; -}; - -const AllowEqualsHeader = ({ current_index, onNextClick, onPrevClick }: TAllowEqualsProps) => ( - } - icon={ - current_index ? ( - - ) : ( - - ) - } - iconPosition={current_index ? 'left' : 'right'} - /> -); - -export default AllowEqualsHeader; diff --git a/packages/trader/src/AppV2/Components/TradeParameters/AllowEquals/allow-equals.scss b/packages/trader/src/AppV2/Components/TradeParameters/AllowEquals/allow-equals.scss index 2e8cc14fbae3..31c03bd896ad 100644 --- a/packages/trader/src/AppV2/Components/TradeParameters/AllowEquals/allow-equals.scss +++ b/packages/trader/src/AppV2/Components/TradeParameters/AllowEquals/allow-equals.scss @@ -1,19 +1,16 @@ $HANDLEBAR_HEIGHT: var(--core-size-1000); $HEADER_TITLE_HEIGHT: var(--core-size-3200); -$FOOTER_BUTTON_HEIGHT: var(--core-size-4000); .allow-equals { &__wrapper { - height: calc(40dvh - $HANDLEBAR_HEIGHT - $HEADER_TITLE_HEIGHT - $FOOTER_BUTTON_HEIGHT); - - &--definition { - height: calc(40dvh - $HANDLEBAR_HEIGHT - $HEADER_TITLE_HEIGHT); - } + height: calc(400px - $HANDLEBAR_HEIGHT - $HEADER_TITLE_HEIGHT); + padding-block-start: 0px; } &__content { display: flex; justify-content: space-between; align-items: center; + padding-block: var(--core-spacing-400); } } diff --git a/packages/trader/src/AppV2/Components/TradeParameters/AllowEquals/allow-equals.tsx b/packages/trader/src/AppV2/Components/TradeParameters/AllowEquals/allow-equals.tsx index e3f857a100ab..240f87dc26e4 100644 --- a/packages/trader/src/AppV2/Components/TradeParameters/AllowEquals/allow-equals.tsx +++ b/packages/trader/src/AppV2/Components/TradeParameters/AllowEquals/allow-equals.tsx @@ -1,12 +1,10 @@ import React from 'react'; import { observer } from 'mobx-react'; import clsx from 'clsx'; -import { ActionSheet, ToggleSwitch, Text, TextField } from '@deriv-com/quill-ui'; +import { ActionSheet, CaptionText, ToggleSwitch, Text, TextField } from '@deriv-com/quill-ui'; import { Localize, localize } from '@deriv/translations'; import { hasCallPutEqual, hasDurationForCallPutEqual } from 'Stores/Modules/Trading/Helpers/allow-equals'; import { useTraderStore } from 'Stores/useTraderStores'; -import Carousel from 'AppV2/Components/Carousel'; -import AllowEqualsHeader from './allow-equals-header'; type TAllowEqualsProps = { is_minimized?: boolean; @@ -17,7 +15,6 @@ const AllowEquals = observer(({ is_minimized }: TAllowEqualsProps) => { useTraderStore(); const [is_open, setIsOpen] = React.useState(false); - const [is_allow_equal_enabled, setIsAllowEqualEnabled] = React.useState(!!is_equal); const has_callputequal_duration = hasDurationForCallPutEqual( contract_types_list, @@ -27,59 +24,11 @@ const AllowEquals = observer(({ is_minimized }: TAllowEqualsProps) => { const has_callputequal = hasCallPutEqual(contract_types_list); const has_allow_equals = (has_callputequal_duration || expiry_type === 'endtime') && has_callputequal; - const onSaveButtonClick = () => { - if (!!is_equal !== is_allow_equal_enabled) - onChange({ target: { name: 'is_equal', value: Number(is_allow_equal_enabled) } }); - }; - const onActionSheetClose = () => { + const onToggleSwitch = (is_enabled: boolean) => { + onChange({ target: { name: 'is_equal', value: Number(is_enabled) } }); setIsOpen(false); - setIsAllowEqualEnabled(!!is_equal); }; - const action_sheet_content = [ - { - id: 1, - component: ( - - -
- - - - setIsAllowEqualEnabled(is_enabled)} - /> -
-
- , - onAction: onSaveButtonClick, - }} - /> -
- ), - }, - { - id: 2, - component: ( - -
- - - -
-
- ), - }, - ]; - - React.useEffect(() => { - setIsAllowEqualEnabled(!!is_equal); - }, [is_equal]); - if (!has_allow_equals) return null; return ( @@ -97,9 +46,20 @@ const AllowEquals = observer(({ is_minimized }: TAllowEqualsProps) => { className={clsx('trade-params__option', is_minimized && 'trade-params__option--minimized')} onClick={() => setIsOpen(true)} /> - + setIsOpen(false)} position='left' expandable={false}> - + } /> + +
+ + + + +
+ + + +
From 250e3885bb1aa9d41850a77906bcb75266676d37 Mon Sep 17 00:00:00 2001 From: kate-deriv Date: Fri, 26 Jul 2024 12:55:40 +0300 Subject: [PATCH 4/8] refactor: guide style --- packages/trader/src/AppV2/Components/Guide/guide.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/trader/src/AppV2/Components/Guide/guide.scss b/packages/trader/src/AppV2/Components/Guide/guide.scss index a8b56d3369a9..f64cc449a102 100644 --- a/packages/trader/src/AppV2/Components/Guide/guide.scss +++ b/packages/trader/src/AppV2/Components/Guide/guide.scss @@ -4,6 +4,8 @@ } &__menu { + position: relative; + width: calc(100vw - var(--component-actionSheet-spacing-padding-lg)); padding-inline-end: var(--component-actionSheet-spacing-padding-lg); margin-block-end: var(--component-actionSheet-spacing-padding-md); display: flex; @@ -22,6 +24,7 @@ &__wrapper { &--content { padding: var(--component-actionSheet-spacing-padding-lg) var(--component-actionSheet-spacing-padding-lg) 0; + overflow-x: hidden; } } From 4815cea8cfebcb71832683b68ceb300c84343d4c Mon Sep 17 00:00:00 2001 From: kate-deriv Date: Fri, 26 Jul 2024 12:56:18 +0300 Subject: [PATCH 5/8] Revert "refactor: remove some tradr params for multipliers and accumulators" This reverts commit f0686ed235a63634297aef0d0d2a86c530a22079. --- .../accumulators-information.scss | 14 ++++++ .../accumulators-information.tsx | 43 +++++++++++++++++++ .../AccumulatorsInformation/index.ts | 4 ++ .../MultipliersInformation/index.ts | 4 ++ .../multipliers-information.scss | 14 ++++++ .../multipliers-information.tsx | 43 +++++++++++++++++++ .../__tests__/trade-parameters.spec.tsx | 14 +++++- .../TradeParameters/trade-parameters.tsx | 4 ++ .../__tests__/trade-param-utils.spec.tsx | 8 +++- .../src/AppV2/Utils/trade-params-utils.tsx | 3 +- 10 files changed, 147 insertions(+), 4 deletions(-) create mode 100644 packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/accumulators-information.scss create mode 100644 packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/accumulators-information.tsx create mode 100644 packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/index.ts create mode 100644 packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/index.ts create mode 100644 packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/multipliers-information.scss create mode 100644 packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/multipliers-information.tsx diff --git a/packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/accumulators-information.scss b/packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/accumulators-information.scss new file mode 100644 index 000000000000..ab04ec211a56 --- /dev/null +++ b/packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/accumulators-information.scss @@ -0,0 +1,14 @@ +.accumulators-info { + &__wrapper { + width: 100%; + } + &__row { + display: flex; + justify-content: space-between; + align-items: center; + padding-block: var(--component-badge-notification-spacing-padding-sm); + } + &__title { + border-bottom: var(--core-borderWidth-75) dotted var(--component-textIcon-normal-default); + } +} diff --git a/packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/accumulators-information.tsx b/packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/accumulators-information.tsx new file mode 100644 index 000000000000..271d00c30a47 --- /dev/null +++ b/packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/accumulators-information.tsx @@ -0,0 +1,43 @@ +import React from 'react'; +import { observer } from 'mobx-react'; +import { Localize, localize } from '@deriv/translations'; +import { Money } from '@deriv/components'; +import { Text } from '@deriv-com/quill-ui'; +import { useTraderStore } from 'Stores/useTraderStores'; + +type TAccumulatorsInformationProps = { + is_minimized?: boolean; +}; + +const AccumulatorsInformation = observer(({ is_minimized }: TAccumulatorsInformationProps) => { + const { currency, maximum_payout, maximum_ticks } = useTraderStore(); + const content = [ + { + label: , + value: , + }, + { + label: , + value: `${maximum_ticks || 0} ${maximum_ticks === 1 ? localize('tick') : localize('ticks')}`, + }, + ]; + + if (is_minimized) return null; + + return ( +
+ {content.map(({ label, value }) => ( +
+ + {label} + + + {value} + +
+ ))} +
+ ); +}); + +export default AccumulatorsInformation; diff --git a/packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/index.ts b/packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/index.ts new file mode 100644 index 000000000000..e5851aa3fbb7 --- /dev/null +++ b/packages/trader/src/AppV2/Components/TradeParameters/AccumulatorsInformation/index.ts @@ -0,0 +1,4 @@ +import AccumulatorsInformation from './accumulators-information'; +import './accumulators-information.scss'; + +export default AccumulatorsInformation; diff --git a/packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/index.ts b/packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/index.ts new file mode 100644 index 000000000000..78a235c0f249 --- /dev/null +++ b/packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/index.ts @@ -0,0 +1,4 @@ +import MultipliersInformation from './multipliers-information'; +import './multipliers-information.scss'; + +export default MultipliersInformation; diff --git a/packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/multipliers-information.scss b/packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/multipliers-information.scss new file mode 100644 index 000000000000..011683551a4f --- /dev/null +++ b/packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/multipliers-information.scss @@ -0,0 +1,14 @@ +.multipliers-info { + &__wrapper { + width: 100%; + } + &__row { + display: flex; + justify-content: space-between; + align-items: center; + padding-block: var(--component-badge-notification-spacing-padding-sm); + } + &__title { + border-bottom: var(--core-borderWidth-75) dotted var(--component-textIcon-normal-default); + } +} diff --git a/packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/multipliers-information.tsx b/packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/multipliers-information.tsx new file mode 100644 index 000000000000..e283dcdee727 --- /dev/null +++ b/packages/trader/src/AppV2/Components/TradeParameters/MultipliersInformation/multipliers-information.tsx @@ -0,0 +1,43 @@ +import React from 'react'; +import { observer } from 'mobx-react'; +import { Localize } from '@deriv/translations'; +import { Money } from '@deriv/components'; +import { Text } from '@deriv-com/quill-ui'; +import { useTraderStore } from 'Stores/useTraderStores'; + +type TMultipliersInformationProps = { + is_minimized?: boolean; +}; + +const MultipliersInformation = observer(({ is_minimized }: TMultipliersInformationProps) => { + const { currency, commission, stop_out } = useTraderStore(); + const content = [ + { + label: , + value: commission, + }, + { + label: , + value: stop_out, + }, + ]; + + if (is_minimized) return null; + + return ( +
+ {content.map(({ label, value }) => ( +
+ + {label} + + + + +
+ ))} +
+ ); +}); + +export default MultipliersInformation; diff --git a/packages/trader/src/AppV2/Components/TradeParameters/__tests__/trade-parameters.spec.tsx b/packages/trader/src/AppV2/Components/TradeParameters/__tests__/trade-parameters.spec.tsx index 228377937df5..8419f6b1f2a6 100644 --- a/packages/trader/src/AppV2/Components/TradeParameters/__tests__/trade-parameters.spec.tsx +++ b/packages/trader/src/AppV2/Components/TradeParameters/__tests__/trade-parameters.spec.tsx @@ -14,8 +14,10 @@ const TRADE_PARAMS = { BARRIER: 'Barrier', GROWTH_RATE: 'GrowthRate', TAKE_PROFIT: 'TakeProfit', + ACCUMULATORS_INFORMATION: 'AccumulatorsInformation', MULTIPLIER: 'Multiplier', RISK_MANAGEMENT: 'RiskManagement', + MULTIPLIERS_INFORMATION: 'MultipliersInformation', TRADE_TYPE_TABS: 'TradeTypeTabs', STRIKE: 'Strike', PAYOUT_PER_POINT: 'PayoutPerPoint', @@ -29,8 +31,14 @@ jest.mock('../Stake', () => jest.fn(() =>
{TRADE_PA jest.mock('../Barrier', () => jest.fn(() =>
{TRADE_PARAMS.BARRIER}
)); jest.mock('../GrowthRate', () => jest.fn(() =>
{TRADE_PARAMS.GROWTH_RATE}
)); jest.mock('../TakeProfit', () => jest.fn(() =>
{TRADE_PARAMS.TAKE_PROFIT}
)); +jest.mock('../AccumulatorsInformation', () => + jest.fn(() =>
{TRADE_PARAMS.ACCUMULATORS_INFORMATION}
) +); jest.mock('../Multiplier', () => jest.fn(() =>
{TRADE_PARAMS.MULTIPLIER}
)); jest.mock('../RiskManagement', () => jest.fn(() =>
{TRADE_PARAMS.RISK_MANAGEMENT}
)); +jest.mock('../MultipliersInformation', () => + jest.fn(() =>
{TRADE_PARAMS.MULTIPLIERS_INFORMATION}
) +); jest.mock('../TradeTypeTabs', () => jest.fn(() =>
{TRADE_PARAMS.TRADE_TYPE_TABS}
)); jest.mock('../Strike', () => jest.fn(() =>
{TRADE_PARAMS.STRIKE}
)); jest.mock('../PayoutPerPoint', () => jest.fn(() =>
{TRADE_PARAMS.PAYOUT_PER_POINT}
)); @@ -64,7 +72,8 @@ describe('TradeParameters', () => { expect(screen.getByText(TRADE_PARAMS.GROWTH_RATE)).toBeInTheDocument(); expect(screen.getByText(TRADE_PARAMS.STAKE)).toBeInTheDocument(); expect(screen.getByText(TRADE_PARAMS.TAKE_PROFIT)).toBeInTheDocument(); - expect(screen.getAllByTestId(data_test)).toHaveLength(3); + expect(screen.getByText(TRADE_PARAMS.ACCUMULATORS_INFORMATION)).toBeInTheDocument(); + expect(screen.getAllByTestId(data_test)).toHaveLength(4); }); it('should render correct trade params for Vanillas', () => { @@ -97,7 +106,8 @@ describe('TradeParameters', () => { expect(screen.getByText(TRADE_PARAMS.MULTIPLIER)).toBeInTheDocument(); expect(screen.getByText(TRADE_PARAMS.STAKE)).toBeInTheDocument(); expect(screen.getByText(TRADE_PARAMS.RISK_MANAGEMENT)).toBeInTheDocument(); - expect(screen.getAllByTestId(data_test)).toHaveLength(3); + expect(screen.getByText(TRADE_PARAMS.MULTIPLIERS_INFORMATION)).toBeInTheDocument(); + expect(screen.getAllByTestId(data_test)).toHaveLength(4); }); it('should render correct trade params for Rise/Fall', () => { diff --git a/packages/trader/src/AppV2/Components/TradeParameters/trade-parameters.tsx b/packages/trader/src/AppV2/Components/TradeParameters/trade-parameters.tsx index 72915a80f723..bab8ae4fedda 100644 --- a/packages/trader/src/AppV2/Components/TradeParameters/trade-parameters.tsx +++ b/packages/trader/src/AppV2/Components/TradeParameters/trade-parameters.tsx @@ -9,8 +9,10 @@ import Stake from './Stake'; import Barrier from './Barrier'; import GrowthRate from './GrowthRate'; import TakeProfit from './TakeProfit'; +import AccumulatorsInformation from './AccumulatorsInformation'; import Multiplier from './Multiplier'; import RiskManagement from './RiskManagement'; +import MultipliersInformation from './MultipliersInformation'; import TradeTypeTabs from './TradeTypeTabs'; import Strike from './Strike'; import PayoutPerPoint from './PayoutPerPoint'; @@ -46,6 +48,8 @@ const TradeParameters = observer(({ is_minimized }: TTradeParametersProps) => { {isVisible('take_profit') && } {isVisible('risk_management') && } {/* {isVisible('expiration') && } */} + {isVisible('accu_info_display') && } + {isVisible('mult_info_display') && }
); }); diff --git a/packages/trader/src/AppV2/Utils/__tests__/trade-param-utils.spec.tsx b/packages/trader/src/AppV2/Utils/__tests__/trade-param-utils.spec.tsx index c9acc0268846..3c22d1ab9b88 100644 --- a/packages/trader/src/AppV2/Utils/__tests__/trade-param-utils.spec.tsx +++ b/packages/trader/src/AppV2/Utils/__tests__/trade-param-utils.spec.tsx @@ -7,7 +7,12 @@ describe('getTradeParams', () => { }); it('should return correct array with keys for Multipliers if symbol does not start with "cry"', () => { - expect(getTradeParams()[TRADE_TYPES.MULTIPLIER]).toEqual(['multiplier', 'stake', 'risk_management']); + expect(getTradeParams()[TRADE_TYPES.MULTIPLIER]).toEqual([ + 'multiplier', + 'stake', + 'risk_management', + 'mult_info_display', + ]); }); it('should return correct array with keys for Multipliers if symbol starts with "cry"', () => { @@ -16,6 +21,7 @@ describe('getTradeParams', () => { 'stake', 'risk_management', 'expiration', + 'mult_info_display', ]); }); }); diff --git a/packages/trader/src/AppV2/Utils/trade-params-utils.tsx b/packages/trader/src/AppV2/Utils/trade-params-utils.tsx index 1b8b424949d3..4cfc33bc6f0b 100644 --- a/packages/trader/src/AppV2/Utils/trade-params-utils.tsx +++ b/packages/trader/src/AppV2/Utils/trade-params-utils.tsx @@ -8,12 +8,13 @@ export const getTradeParams = (symbol?: string) => ({ [TRADE_TYPES.MATCH_DIFF]: ['last_digit', 'duration', 'stake'], [TRADE_TYPES.EVEN_ODD]: ['duration', 'stake'], [TRADE_TYPES.OVER_UNDER]: ['last_digit', 'duration', 'stake'], - [TRADE_TYPES.ACCUMULATOR]: ['growth_rate', 'stake', 'take_profit'], + [TRADE_TYPES.ACCUMULATOR]: ['growth_rate', 'stake', 'take_profit', 'accu_info_display'], [TRADE_TYPES.MULTIPLIER]: [ 'multiplier', 'stake', 'risk_management', ...(shouldShowExpiration(symbol) ? ['expiration'] : []), + 'mult_info_display', ], [TRADE_TYPES.TURBOS.LONG]: ['trade_type_tabs', 'duration', 'payout_per_point', 'stake', 'take_profit'], [TRADE_TYPES.TURBOS.SHORT]: ['trade_type_tabs', 'duration', 'payout_per_point', 'stake', 'take_profit'], From 34db8e894e102efe4df44fd857c7e4d8c9507e08 Mon Sep 17 00:00:00 2001 From: kate-deriv Date: Fri, 26 Jul 2024 13:08:05 +0300 Subject: [PATCH 6/8] refactor: hide scrollbar for safari --- packages/trader/src/AppV2/Components/Guide/guide.scss | 8 ++++++++ .../Components/TradeParameters/trade-parameters.scss | 3 +++ packages/trader/src/AppV2/Containers/Trade/trade.scss | 4 ++++ 3 files changed, 15 insertions(+) diff --git a/packages/trader/src/AppV2/Components/Guide/guide.scss b/packages/trader/src/AppV2/Components/Guide/guide.scss index f64cc449a102..684b362734f6 100644 --- a/packages/trader/src/AppV2/Components/Guide/guide.scss +++ b/packages/trader/src/AppV2/Components/Guide/guide.scss @@ -16,6 +16,10 @@ -ms-overflow-style: none; scrollbar-width: none; + &::-webkit-scrollbar { + display: none; + } + button { background-color: transparent; } @@ -33,6 +37,10 @@ height: calc(90dvh - 23rem); -ms-overflow-style: none; scrollbar-width: none; + + &::-webkit-scrollbar { + display: none; + } } &__button { diff --git a/packages/trader/src/AppV2/Components/TradeParameters/trade-parameters.scss b/packages/trader/src/AppV2/Components/TradeParameters/trade-parameters.scss index 4cd690126210..cb6404b48955 100644 --- a/packages/trader/src/AppV2/Components/TradeParameters/trade-parameters.scss +++ b/packages/trader/src/AppV2/Components/TradeParameters/trade-parameters.scss @@ -32,6 +32,9 @@ padding: 0px; transition: transform 0.5s, opacity 0.5s, max-height 0.5s, padding 0.1s; + &::-webkit-scrollbar { + display: none; + } &--enter, &--exit { opacity: 0; diff --git a/packages/trader/src/AppV2/Containers/Trade/trade.scss b/packages/trader/src/AppV2/Containers/Trade/trade.scss index 28efc5f2d4de..a1072eaefa73 100644 --- a/packages/trader/src/AppV2/Containers/Trade/trade.scss +++ b/packages/trader/src/AppV2/Containers/Trade/trade.scss @@ -18,6 +18,10 @@ white-space: nowrap; scrollbar-width: none; + &::-webkit-scrollbar { + display: none; + } + button { background-color: transparent; } From 4fa4a6babd10bfacf076e37887257834cfd88ebe Mon Sep 17 00:00:00 2001 From: kate-deriv Date: Fri, 26 Jul 2024 13:57:11 +0300 Subject: [PATCH 7/8] refactor: update type --- .../AppV2/Components/PurchaseButton/purchase-button-content.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/trader/src/AppV2/Components/PurchaseButton/purchase-button-content.tsx b/packages/trader/src/AppV2/Components/PurchaseButton/purchase-button-content.tsx index 2a50c38b8e80..e420f49e8497 100644 --- a/packages/trader/src/AppV2/Components/PurchaseButton/purchase-button-content.tsx +++ b/packages/trader/src/AppV2/Components/PurchaseButton/purchase-button-content.tsx @@ -7,7 +7,7 @@ import { Money } from '@deriv/components'; type TPurchaseButtonContent = { current_stake?: number | null; - info: ReturnType['proposal_info'][0]; + info: ReturnType['proposal_info'][0] | Record; is_reverse?: boolean; } & Pick< ReturnType, From d0defcfca54833a7046cfd770456272ffa4d8a0d Mon Sep 17 00:00:00 2001 From: kate-deriv Date: Fri, 26 Jul 2024 14:46:42 +0300 Subject: [PATCH 8/8] chore: remove px --- .../Components/TradeParameters/AllowEquals/allow-equals.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/trader/src/AppV2/Components/TradeParameters/AllowEquals/allow-equals.scss b/packages/trader/src/AppV2/Components/TradeParameters/AllowEquals/allow-equals.scss index 31c03bd896ad..ef1917e674a8 100644 --- a/packages/trader/src/AppV2/Components/TradeParameters/AllowEquals/allow-equals.scss +++ b/packages/trader/src/AppV2/Components/TradeParameters/AllowEquals/allow-equals.scss @@ -4,7 +4,7 @@ $HEADER_TITLE_HEIGHT: var(--core-size-3200); .allow-equals { &__wrapper { height: calc(400px - $HANDLEBAR_HEIGHT - $HEADER_TITLE_HEIGHT); - padding-block-start: 0px; + padding-block-start: 0; } &__content {