Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit bec75bf

Browse files
committed
fix: trade dialog filter
1 parent 6e137bc commit bec75bf

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/common/common.es6

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ const trade_types = [{
6464
}];
6565

6666
const SUPPORTED_CONTRACT_TYPES = Object.freeze([
67-
'up/down',
68-
'touch/no touch',
69-
'in/out',
67+
'callput',
68+
'touchnotouch',
69+
'endsinout',
7070
'digits',
71-
'asians',
72-
'rise/fall equal',
73-
'lookbacks'
71+
'asian',
72+
'callputequal',
73+
'lookback'
7474
]);
7575

7676
export { trade_types, SUPPORTED_CONTRACT_TYPES };

src/trade/tradeDialog.es6

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,17 +1019,18 @@ function init_state(available,root, dialog, symbol, contracts_for_spot) {
10191019
};
10201020

10211021
_(available)
1022-
.map('contract_category_display')
1022+
.map('contract_category')
10231023
.uniq()
10241024
.value()
10251025
// TODO: Remove this filter after implementing reset, high/low, spread, runs contracts.
10261026
.filter(f => SUPPORTED_CONTRACT_TYPES.includes(f.toLowerCase()))
10271027
.forEach(x => {
10281028
let y = {};
1029-
y.contract_category_display = x;
1030-
let contract_object = _.find(available, {contract_category_display: x});
1029+
y.contract_category = x;
1030+
let contract_object = _.find(available, {contract_category: x});
10311031
if (contract_object) {
10321032
y.contract_category = contract_object.contract_category;
1033+
y.contract_category_display = contract_object.contract_category_display
10331034
state.categories.array.push(y);
10341035
}
10351036
});

0 commit comments

Comments
 (0)