From d401dfb66c7439dfe69772425a91a156fc20d79e Mon Sep 17 00:00:00 2001 From: amina-deriv Date: Tue, 24 Oct 2023 20:39:32 +0400 Subject: [PATCH 1/2] fix: test exisitng account flow --- .../trading-assessment/trading-assessment-form.jsx | 2 +- .../Modals/trading-assessment-existing-user.jsx | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/account/src/Components/trading-assessment/trading-assessment-form.jsx b/packages/account/src/Components/trading-assessment/trading-assessment-form.jsx index bff3c541e0ba..f0b204436760 100644 --- a/packages/account/src/Components/trading-assessment/trading-assessment-form.jsx +++ b/packages/account/src/Components/trading-assessment/trading-assessment-form.jsx @@ -1,5 +1,6 @@ import classNames from 'classnames'; import React from 'react'; +import { observer, useStore } from '@deriv/stores'; import { Formik, Form } from 'formik'; import { Button, Modal, Text } from '@deriv/components'; import { isMobile } from '@deriv/shared'; @@ -7,7 +8,6 @@ import { localize, Localize, getLanguage } from '@deriv/translations'; import TradingAssessmentRadioButton from './trading-assessment-radio-buttons.jsx'; import TradingAssessmentDropdown from './trading-assessment-dropdown.jsx'; import InlineNoteWithIcon from '../inline-note-with-icon'; -import { observer, useStore } from '@deriv/stores'; const TradingAssessmentForm = observer( ({ diff --git a/packages/core/src/App/Containers/Modals/trading-assessment-existing-user.jsx b/packages/core/src/App/Containers/Modals/trading-assessment-existing-user.jsx index 114a70236f4b..a01b132b2cbd 100644 --- a/packages/core/src/App/Containers/Modals/trading-assessment-existing-user.jsx +++ b/packages/core/src/App/Containers/Modals/trading-assessment-existing-user.jsx @@ -2,7 +2,9 @@ import React from 'react'; import { Modal, DesktopWrapper, MobileDialog, MobileWrapper } from '@deriv/components'; import { Localize, localize } from '@deriv/translations'; import { connect } from 'Stores/connect'; -import { RiskToleranceWarningModal, TradingAssessmentForm, tradingAssessmentConfig } from '@deriv/account'; +import TradingAssessmentForm from '@deriv/account/src/Components/trading-assessment/trading-assessment-form.jsx'; +import tradingAssessmentConfig from '@deriv/account/src/Configs/trading-assessment-config'; +import RiskToleranceWarningModal from '@deriv/account/src/Components/trading-assessment/risk-tolerance-warning-modal.jsx'; import TradingExperienceModal from './trading-experience-modal.jsx'; const TradingAssessmentExistingUser = ({ @@ -87,12 +89,12 @@ const TradingAssessmentExistingUser = ({ has_sub_header /> ); - } else if (should_show_trade_assessment_form) { + } else if (true) { return ( Date: Tue, 24 Oct 2023 21:15:23 +0400 Subject: [PATCH 2/2] fix: revert hard coded value --- .../Containers/Modals/trading-assessment-existing-user.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/App/Containers/Modals/trading-assessment-existing-user.jsx b/packages/core/src/App/Containers/Modals/trading-assessment-existing-user.jsx index a01b132b2cbd..47aec84f8468 100644 --- a/packages/core/src/App/Containers/Modals/trading-assessment-existing-user.jsx +++ b/packages/core/src/App/Containers/Modals/trading-assessment-existing-user.jsx @@ -89,12 +89,12 @@ const TradingAssessmentExistingUser = ({ has_sub_header /> ); - } else if (true) { + } else if (should_show_trade_assessment_form) { return (