Skip to content

Commit

Permalink
chore: clean and fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
prince-deriv committed Jul 3, 2024
1 parent 770fbb2 commit e953919
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/javascript/app/pages/trade/contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const Contract = (() => {
}
barrier = form_barrier.barrier_category;

contracts?.available.forEach((current_obj) => {
contracts.available.forEach((current_obj) => {
const contract_category = current_obj.contract_category;
// for callput and callputequals, populate duration for both
if (form === contract_category || (/callput/.test(form) && /callput/.test(contract_category))) {
Expand Down Expand Up @@ -202,7 +202,7 @@ const Contract = (() => {
const getContractCategories = () => {
const contracts = Contract.contracts().contracts_for;
const contract_categories = {};
contracts?.available?.forEach((current_obj) => {
contracts.available.forEach((current_obj) => {
const contract_category = current_obj.contract_category;
const contract_barrier = current_obj.barrier_category;
const contract_display = current_obj.contract_category_display;
Expand Down
2 changes: 0 additions & 2 deletions src/javascript/app/pages/trade/markets/market-selector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import Defaults, { PARAM_NAMES } from '../defaults.js';

const MarketSelector = () => {
const [marketLabel, setMarketLabel] = useState(getMarketName());
const [isMarketDropdownOpen, setMarketDropdownOpen] = useState(false);
const [isContractDropdownOpen, setIsContractDropdownOpen] = useState(false);
const [tradeTypeLabel, setTradeTypeLabel] = useState('');
const hasContractChange = useContractChange();
Expand Down Expand Up @@ -46,7 +45,6 @@ const MarketSelector = () => {

useEffect(() => {
setMarketLabel(getMarketName());
setMarketDropdownOpen(false);
}, [hasMarketChange]);

return (
Expand Down

0 comments on commit e953919

Please sign in to comment.