Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions src/javascript/app/pages/user/metatrader/metatrader.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,14 +531,8 @@ const MetaTraderConfig = (() => {

const isAuthenticationPromptNeeded = () => {
const authentication = State.getResponse('get_account_status.authentication');
const { identity, document, needs_verification } = authentication;
const is_need_verification = needs_verification.length;
const is_identity_authenticated = /^(verified)$/.test(identity.status);
const is_document_authenticated = /^(verified)$/.test(document.status);
const has_been_authenticated = (is_identity_authenticated && is_document_authenticated)
&& !is_need_verification;

return !has_been_authenticated;
const { needs_verification } = authentication;
return needs_verification.length && (needs_verification.includes('identity') || needs_verification.includes('document'));
};

// remove server from acc_type for cases where we don't need it
Expand Down