From bda77ffcbb60b011d8396506f3596feb78b9d3b7 Mon Sep 17 00:00:00 2001 From: Agrim Jain Date: Tue, 13 Aug 2024 09:39:36 +0400 Subject: [PATCH 01/10] chore: filtering api call name --- .../Dropdown/DropdownList/index.tsx | 52 ++++++++++++------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx b/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx index 8f09fd8be..78e9cbf8b 100644 --- a/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx +++ b/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx @@ -13,6 +13,20 @@ type TDropdownList = { setSearchResults: (result: string) => void; }; +const filterOptions = (options, query) => { + query = query.toLowerCase(); + return options.filter((option) => { + const firstKey = Object.keys(option.body)[0]; + if (option.title.toLowerCase().includes(query)) { + return true; + } + if (firstKey && firstKey.toLowerCase().includes(query)) { + return true; + } + return false; + }); +}; + const DropdownList = ({ setSelected, handleChange, @@ -21,6 +35,8 @@ const DropdownList = ({ setSearchResults, selected_value, }: TDropdownList) => { + const filteredOptions = filterOptions(playground_requests, searchResults); + return (
ALL CALLS
- {playground_requests - .filter((option) => { - return option.title.toLowerCase().includes(searchResults.toLowerCase()) ? option : null; - }) - .map((option) => ( -
{ - setSelected(option.title); - setIsActive(false); - handleChange(e, option.name); - }} - className={clsx(styles.dropdownItem, { - [styles.dropdownSelected]: selected_value === option.title, - })} - data-testid={`apiDropdownItems{option.name}`} - > - {option.title} -
- ))} + {filteredOptions.map((option) => ( +
{ + setSelected(option.title); + setIsActive(false); + handleChange(e, option.name); + }} + className={clsx(styles.dropdownItem, { + [styles.dropdownSelected]: selected_value === option.title, + })} + data-testid={`apiDropdownItems{option.name}`} + > + {option.title} +
+ ))} ); From 9c9a1bf52a1ce9a29d1ac490c28d4b59364a92b7 Mon Sep 17 00:00:00 2001 From: Agrim Jain Date: Tue, 13 Aug 2024 14:40:17 +0400 Subject: [PATCH 02/10] fix: readability --- .../Dropdown/DropdownList/index.tsx | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx b/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx index 78e9cbf8b..5353aadd2 100644 --- a/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx +++ b/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx @@ -3,6 +3,12 @@ import { playground_requests } from '@site/src/utils/playground_requests'; import clsx from 'clsx'; import styles from './DropdownList.module.scss'; +type TOption = { + name: string; + title: string; + body: Record; +}; + type TDropdownList = { selected: string; setSelected: (value: string) => void; @@ -15,26 +21,25 @@ type TDropdownList = { const filterOptions = (options, query) => { query = query.toLowerCase(); - return options.filter((option) => { + return Object.values(options).filter((option: TOption) => { + const lowerCaseTitle = option.title.toLowerCase(); const firstKey = Object.keys(option.body)[0]; - if (option.title.toLowerCase().includes(query)) { - return true; - } - if (firstKey && firstKey.toLowerCase().includes(query)) { + + if (lowerCaseTitle.includes(query) || (firstKey && firstKey.toLowerCase().includes(query))) { return true; } return false; }); }; -const DropdownList = ({ +const DropdownList: React.FC = ({ setSelected, handleChange, setIsActive, searchResults, setSearchResults, selected_value, -}: TDropdownList) => { +}) => { const filteredOptions = filterOptions(playground_requests, searchResults); return ( @@ -66,7 +71,7 @@ const DropdownList = ({ className={clsx(styles.dropdownItem, { [styles.dropdownSelected]: selected_value === option.title, })} - data-testid={`apiDropdownItems{option.name}`} + data-testid={`apiDropdownItems${option.name}`} > {option.title} From 91d2ad6581bf4e7d61bad23aa14ae6102fd23593 Mon Sep 17 00:00:00 2001 From: Agrim Jain Date: Wed, 14 Aug 2024 08:06:35 +0400 Subject: [PATCH 03/10] fix: fixes --- src/features/Apiexplorer/Dropdown/DropdownList/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx b/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx index 5353aadd2..8b57204d7 100644 --- a/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx +++ b/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx @@ -19,13 +19,13 @@ type TDropdownList = { setSearchResults: (result: string) => void; }; -const filterOptions = (options, query) => { +const filterOptions = (options: Record, query: string) => { query = query.toLowerCase(); return Object.values(options).filter((option: TOption) => { - const lowerCaseTitle = option.title.toLowerCase(); + const title = option.title.toLowerCase(); const firstKey = Object.keys(option.body)[0]; - if (lowerCaseTitle.includes(query) || (firstKey && firstKey.toLowerCase().includes(query))) { + if (title.includes(query) || (firstKey && firstKey.toLowerCase().includes(query))) { return true; } return false; From da15692b856e267f2e4dc50c56daac3a5c3c3d43 Mon Sep 17 00:00:00 2001 From: Agrim Jain Date: Thu, 22 Aug 2024 10:52:51 +0400 Subject: [PATCH 04/10] fix: update with master From 647eb5f60b3c4bd6065896e1a4b0d16a5f540ca8 Mon Sep 17 00:00:00 2001 From: nobody Date: Tue, 27 Aug 2024 03:48:59 +0000 Subject: [PATCH 05/10] JSON Schema Update --- config/v3/ticks_history/example.json | 1 - 1 file changed, 1 deletion(-) diff --git a/config/v3/ticks_history/example.json b/config/v3/ticks_history/example.json index e40c62ed8..98e5b69c6 100644 --- a/config/v3/ticks_history/example.json +++ b/config/v3/ticks_history/example.json @@ -3,6 +3,5 @@ "adjust_start_time": 1, "count": 10, "end": "latest", - "start": 1, "style": "ticks" } From 26cd7d97b1982366ecfeff562e6633b9aa4a4682 Mon Sep 17 00:00:00 2001 From: nobody Date: Tue, 27 Aug 2024 03:50:09 +0000 Subject: [PATCH 06/10] JSON Schema Update --- config/v3/proposal/receive.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/config/v3/proposal/receive.json b/config/v3/proposal/receive.json index 1dac226f9..48a3e1eca 100644 --- a/config/v3/proposal/receive.json +++ b/config/v3/proposal/receive.json @@ -35,6 +35,10 @@ "description": "[Only for vanilla options] The choices of predefined strike price for client to choose", "type": "array" }, + "barrier_spot_distance": { + "description": "[Only for Turbos] The relative distance between current spot and the barrier.", + "type": "string" + }, "cancellation": { "description": "Contains information about contract cancellation option.", "type": "object", @@ -299,6 +303,13 @@ 10 ] }, + "payout_choices": { + "description": "[Only for Turbos] The choices of predefined payout per point for client to choose", + "type": "array", + "items": { + "type": "number" + } + }, "spot": { "description": "Spot value (if there are no Exchange data-feed licensing restrictions for the underlying symbol).", "type": "number", From 10bac41593d4fd832ded064717682b8ea77ef921 Mon Sep 17 00:00:00 2001 From: nobody Date: Wed, 28 Aug 2024 06:44:43 +0000 Subject: [PATCH 07/10] JSON Schema Update --- config/v3/ticks_history/example.json | 1 + 1 file changed, 1 insertion(+) diff --git a/config/v3/ticks_history/example.json b/config/v3/ticks_history/example.json index 98e5b69c6..e40c62ed8 100644 --- a/config/v3/ticks_history/example.json +++ b/config/v3/ticks_history/example.json @@ -3,5 +3,6 @@ "adjust_start_time": 1, "count": 10, "end": "latest", + "start": 1, "style": "ticks" } From b57e2631e2f51178c33991e40d842792a8bcf944 Mon Sep 17 00:00:00 2001 From: nobody Date: Wed, 28 Aug 2024 09:11:15 +0000 Subject: [PATCH 08/10] JSON Schema Update --- config/v3/mt5_new_account/send.json | 3 ++- config/v3/trading_servers/receive.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/v3/mt5_new_account/send.json b/config/v3/mt5_new_account/send.json index 6522bb3dd..679e1c3ab 100644 --- a/config/v3/mt5_new_account/send.json +++ b/config/v3/mt5_new_account/send.json @@ -155,7 +155,8 @@ "p01_ts03", "p01_ts04", "p02_ts02", - "p03_ts01" + "p03_ts01", + "p03_ts02" ] }, "state": { diff --git a/config/v3/trading_servers/receive.json b/config/v3/trading_servers/receive.json index 96efb9c52..dc9620c1a 100644 --- a/config/v3/trading_servers/receive.json +++ b/config/v3/trading_servers/receive.json @@ -75,7 +75,8 @@ "p01_ts03", "p01_ts04", "p02_ts02", - "p03_ts01" + "p03_ts01", + "p03_ts02" ] }, "market_type": { From ea107701295ca389468898e39b59ce3aba31bfba Mon Sep 17 00:00:00 2001 From: nobody Date: Fri, 30 Aug 2024 03:04:13 +0000 Subject: [PATCH 09/10] JSON Schema Update --- config/v3/partner_settings/receive.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/v3/partner_settings/receive.json b/config/v3/partner_settings/receive.json index fb86af9e4..03b658eb6 100644 --- a/config/v3/partner_settings/receive.json +++ b/config/v3/partner_settings/receive.json @@ -33,6 +33,11 @@ "company" ] }, + "platform_URL": { + "description": "Platform URL for Dynamic works dashboard to be redirected from Partners Hub which will be set in BackOffice.", + "type": "string", + "pattern": "^[\\w_@./:#&+-]*$" + }, "provider": { "description": "Defines the provider platform.", "type": "string", From 464649282f01021ff2752dae82f00b0b00e938a6 Mon Sep 17 00:00:00 2001 From: nobody Date: Fri, 30 Aug 2024 03:07:15 +0000 Subject: [PATCH 10/10] JSON Schema Update --- config/v3/proposal/receive.json | 34 ++++++++++++++++--- config/v3/proposal_open_contract/receive.json | 32 ++++++++++++++--- 2 files changed, 57 insertions(+), 9 deletions(-) diff --git a/config/v3/proposal/receive.json b/config/v3/proposal/receive.json index 48a3e1eca..336f90f9d 100644 --- a/config/v3/proposal/receive.json +++ b/config/v3/proposal/receive.json @@ -206,8 +206,15 @@ "description": "Localized display name", "type": "string" }, + "display_order_amount": { + "description": "Stop loss amount for display purpose.", + "type": [ + "null", + "string" + ] + }, "order_amount": { - "description": "Stop loss amount", + "description": "Stop loss amount. Will be deprecated soon. Please use [display_order_amount].", "type": [ "null", "number" @@ -235,9 +242,19 @@ "description": "Localized display name", "type": "string" }, + "display_order_amount": { + "description": "Stop out amount for display purpose.", + "type": [ + "null", + "string" + ] + }, "order_amount": { - "description": "Stop out amount", - "type": "number" + "description": "Stop out amount. Will be deprecated soon. Please use [display_order_amount].", + "type": [ + "null", + "number" + ] }, "order_date": { "description": "Stop out order epoch", @@ -258,8 +275,15 @@ "description": "Localized display name", "type": "string" }, + "display_order_amount": { + "description": "Take profit amount for display purpose.", + "type": [ + "null", + "string" + ] + }, "order_amount": { - "description": "Take profit amount", + "description": "Take profit amount. Will be deprecated soon. Please use [display_order_amount].", "type": [ "null", "number" @@ -307,7 +331,7 @@ "description": "[Only for Turbos] The choices of predefined payout per point for client to choose", "type": "array", "items": { - "type": "number" + "type": "string" } }, "spot": { diff --git a/config/v3/proposal_open_contract/receive.json b/config/v3/proposal_open_contract/receive.json index db6f96fbe..433955ede 100644 --- a/config/v3/proposal_open_contract/receive.json +++ b/config/v3/proposal_open_contract/receive.json @@ -517,8 +517,15 @@ "description": "Localized display name", "type": "string" }, + "display_order_amount": { + "description": "Stop loss amount for display purpose.", + "type": [ + "null", + "string" + ] + }, "order_amount": { - "description": "Stop loss amount", + "description": "Stop loss amount. Will be deprecated soon. Please use [display_order_amount].", "type": [ "null", "number" @@ -546,9 +553,19 @@ "description": "Localized display name", "type": "string" }, + "display_order_amount": { + "description": "Stop out amount for display purpose.", + "type": [ + "null", + "string" + ] + }, "order_amount": { - "description": "Stop out amount", - "type": "number" + "description": "Stop out amount. Will be deprecated soon. Please use [display_order_amount].", + "type": [ + "null", + "number" + ] }, "order_date": { "description": "Stop out order epoch", @@ -569,8 +586,15 @@ "description": "Localized display name", "type": "string" }, + "display_order_amount": { + "description": "Take profit amount for display purpose.", + "type": [ + "null", + "string" + ] + }, "order_amount": { - "description": "Take profit amount", + "description": "Take profit amount. Will be deprecated soon. Please use [display_order_amount].", "type": [ "null", "number"