Skip to content

Commit

Permalink
fix: assign correct barrier category to rise/fall (deriv-com#17031)
Browse files Browse the repository at this point in the history
  • Loading branch information
henry-deriv authored Oct 3, 2024
1 parent f3e56bb commit f3fdc32
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/trader/src/AppV2/Hooks/useContractsForCompany.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,10 @@ const useContractsForCompany = () => {
available_contract_types[type] = cloneObject(contract_types[type]);
}
const config: TConfig = available_contract_types[type].config || {};
config.barrier_category = contract.barrier_category as TConfig['barrier_category'];
config.barrier_category =
contract_types[type].barrier_count === 0
? 'euro_atm'
: (contract.barrier_category as TConfig['barrier_category']);

available_contract_types[type].config = config;
});
Expand Down

0 comments on commit f3fdc32

Please sign in to comment.