From 7a42e7d288e4836a95926d02ab4e32845cf6d60a Mon Sep 17 00:00:00 2001 From: kate-deriv Date: Wed, 29 Mar 2023 19:51:52 +0300 Subject: [PATCH] fix: change key for profit table and statment --- packages/reports/src/Containers/profit-table.jsx | 3 ++- packages/reports/src/Containers/statement.jsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/reports/src/Containers/profit-table.jsx b/packages/reports/src/Containers/profit-table.jsx index 38b463af83ad..3fbd579bf57a 100644 --- a/packages/reports/src/Containers/profit-table.jsx +++ b/packages/reports/src/Containers/profit-table.jsx @@ -17,6 +17,7 @@ import { ReportsMeta } from '../Components/reports-meta.jsx'; import { getProfitTableColumnsTemplate } from 'Constants/data-table-constants'; const getRowAction = row_obj => { + const unsupported_contract_type = extractInfoFromShortcode(row_obj.shortcode).category.toUpperCase(); return getSupportedContracts()[extractInfoFromShortcode(row_obj.shortcode).category.toUpperCase()] && !isForwardStarting(row_obj.shortcode, row_obj.purchase_time_unix) ? getContractPath(row_obj.contract_id) @@ -25,7 +26,7 @@ const getRowAction = row_obj => { ), diff --git a/packages/reports/src/Containers/statement.jsx b/packages/reports/src/Containers/statement.jsx index f4289aaa6e2d..510c290badc7 100644 --- a/packages/reports/src/Containers/statement.jsx +++ b/packages/reports/src/Containers/statement.jsx @@ -55,6 +55,7 @@ const DetailsComponent = ({ message = '', action_type = '' }) => { const getRowAction = row_obj => { let action; if (row_obj.id && ['buy', 'sell'].includes(row_obj.action_type)) { + const unsupported_contract_type = extractInfoFromShortcode(row_obj.shortcode).category.toUpperCase(); action = getSupportedContracts()[extractInfoFromShortcode(row_obj.shortcode).category.toUpperCase()] && !isForwardStarting(row_obj.shortcode, row_obj.purchase_time || row_obj.transaction_time) @@ -64,7 +65,7 @@ const getRowAction = row_obj => { ),