Skip to content

Commit

Permalink
chore: add authorize check to solve issue (#13166)
Browse files Browse the repository at this point in the history
  • Loading branch information
suisin-deriv authored and heorhi-deriv committed Jan 26, 2024
1 parent e6e4b01 commit bfb8f7c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/core/src/App/Containers/Modals/app-modals.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const InformationSubmittedModal = React.lazy(() =>
const AppModals = observer(() => {
const { client, ui, traders_hub } = useStore();
const {
is_authorize,
is_logged_in,
fetchFinancialAssessment,
setCFDScore,
Expand Down Expand Up @@ -102,12 +103,12 @@ const AppModals = observer(() => {
const is_eu_user = [ContentFlag.LOW_RISK_CR_EU, ContentFlag.EU_REAL, ContentFlag.EU_DEMO].includes(content_flag);

React.useEffect(() => {
if (is_logged_in) {
if (is_logged_in && is_authorize) {
fetchFinancialAssessment().then(response => {
setCFDScore(response?.cfd_score ?? 0);
});
}
}, [is_logged_in]);
}, [is_logged_in, is_authorize]);
if (temp_session_signup_params && window.location.href.includes(routes.onboarding)) {
toggleAccountSignupModal(true);
} else {
Expand Down

0 comments on commit bfb8f7c

Please sign in to comment.