From f1346f717b7129048dd315c5340c1721dc310837 Mon Sep 17 00:00:00 2001 From: maryia-deriv Date: Thu, 8 Aug 2024 16:00:41 +0300 Subject: [PATCH] fix: more nit-picks --- src/javascript/app/pages/loader.jsx | 2 +- .../app/pages/trade/markets/contracts-dropdown.jsx | 2 +- src/javascript/app/pages/trade/price.js | 4 ++-- .../app/pages/trade/purchase/contract-details.jsx | 12 ++++++------ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/javascript/app/pages/loader.jsx b/src/javascript/app/pages/loader.jsx index d68996fcb80..c37ac570a04 100644 --- a/src/javascript/app/pages/loader.jsx +++ b/src/javascript/app/pages/loader.jsx @@ -38,7 +38,7 @@ const pageTypes = [ const Loader = () => { const hasContractChange = useContractChange(); - const [loading,setLoading] = useState(true); + const [loading, setLoading] = useState(true); const getPageType = () => pageTypes.find(({ code }) => window.location.pathname.includes(code)) || { name: 'Generic', code: '' }; diff --git a/src/javascript/app/pages/trade/markets/contracts-dropdown.jsx b/src/javascript/app/pages/trade/markets/contracts-dropdown.jsx index 7f74806bae6..36cc90aa31a 100644 --- a/src/javascript/app/pages/trade/markets/contracts-dropdown.jsx +++ b/src/javascript/app/pages/trade/markets/contracts-dropdown.jsx @@ -23,7 +23,7 @@ export const ContractDropdown = () => { contractElement.dispatchEvent(event); } - Defaults.set(PARAM_NAMES.FORM_NAME,formName); + Defaults.set(PARAM_NAMES.FORM_NAME, formName); dataManager.setContract({ formName, diff --git a/src/javascript/app/pages/trade/price.js b/src/javascript/app/pages/trade/price.js index 39fcede177b..054cc6d3bfe 100644 --- a/src/javascript/app/pages/trade/price.js +++ b/src/javascript/app/pages/trade/price.js @@ -246,8 +246,8 @@ const Price = (() => { CommonFunctions.elementInnerHtml(contract_multiplier, data.multiplier ? formatMoney(currentCurrency, data.multiplier, false, 0, 2) : '-'); dataManager.setPurchase({ - [`${position}Amount`] : data.display_value ? formatMoney(currentCurrency, data.display_value,true) : '-', - [`${position}PayoutAmount`]: data.payout ? formatMoney(currentCurrency, data.payout,true) : '-', + [`${position}Amount`] : data.display_value ? formatMoney(currentCurrency, data.display_value, true) : '-', + [`${position}PayoutAmount`]: data.payout ? formatMoney(currentCurrency, data.payout, true) : '-', [`${position}Multiplier`] : data.multiplier ? formatMoney(currentCurrency, data.multiplier, true, 0, 2) : '-', currency : getCurrencyDisplayCode(currentCurrency), }); diff --git a/src/javascript/app/pages/trade/purchase/contract-details.jsx b/src/javascript/app/pages/trade/purchase/contract-details.jsx index 188afb4a780..3334b37f35f 100644 --- a/src/javascript/app/pages/trade/purchase/contract-details.jsx +++ b/src/javascript/app/pages/trade/purchase/contract-details.jsx @@ -31,7 +31,7 @@ const resetPopupData = (isAuditReset = false) => { }; const AuditSection = ({ data }) => { - const auditData = { + const audit_data = { start: { title : localize('Contract starts'), content: data?.auditDataStart, @@ -74,12 +74,12 @@ const AuditSection = ({ data }) => {
- {Object.keys(auditData).map(adk =>{ - const { title, content } = auditData[adk]; + {Object.keys(audit_data).map(audit_data_key =>{ + const { title, content } = audit_data[audit_data_key]; if (content?.length) { return ( - +
{title} @@ -97,8 +97,8 @@ const AuditSection = ({ data }) => {
- {content?.map((audit,ak) => - + {content?.map((audit, audit_key) => +
{ audit?.name}