Skip to content

Commit

Permalink
fix: more nit-picks
Browse files Browse the repository at this point in the history
  • Loading branch information
maryia-deriv committed Aug 8, 2024
1 parent d27e162 commit f1346f7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/javascript/app/pages/loader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: '' };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/javascript/app/pages/trade/price.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
});
Expand Down
12 changes: 6 additions & 6 deletions src/javascript/app/pages/trade/purchase/contract-details.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const resetPopupData = (isAuditReset = false) => {
};

const AuditSection = ({ data }) => {
const auditData = {
const audit_data = {
start: {
title : localize('Contract starts'),
content: data?.auditDataStart,
Expand Down Expand Up @@ -74,12 +74,12 @@ const AuditSection = ({ data }) => {
</div>
<div className='details-column'>
<div className='contract-info-wrapper full'>
{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 (
<React.Fragment key={`audit-table-${title}-${adk}`}>
<React.Fragment key={`audit-table-${title}-${audit_data_key}`}>
<div className='table-box' >
<Text size='md' bold centered>
{title}
Expand All @@ -97,8 +97,8 @@ const AuditSection = ({ data }) => {
</span>
</div>
</div>
{content?.map((audit,ak) =>
<React.Fragment key={`audit-${audit.tick}-${ak}`}>
{content?.map((audit, audit_key) =>
<React.Fragment key={`audit-${audit.tick}-${audit_key}`}>
<div className='table-item'>
<div className='item-header'>
<Text size='sm' bold>{ audit?.name}</Text>
Expand Down

0 comments on commit f1346f7

Please sign in to comment.