Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit 643fc82

Browse files
authored
yashim/hotfix: mt5 authentication prompt display (#6831)
* fix: show authenticate message logic * fix: conditions * fix: only require verification when the needs_verification array is populated
1 parent e0b7ea2 commit 643fc82

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/javascript/app/pages/user/metatrader/metatrader.config.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -531,14 +531,8 @@ const MetaTraderConfig = (() => {
531531

532532
const isAuthenticationPromptNeeded = () => {
533533
const authentication = State.getResponse('get_account_status.authentication');
534-
const { identity, document, needs_verification } = authentication;
535-
const is_need_verification = needs_verification.length;
536-
const is_identity_authenticated = /^(verified)$/.test(identity.status);
537-
const is_document_authenticated = /^(verified)$/.test(document.status);
538-
const has_been_authenticated = (is_identity_authenticated && is_document_authenticated)
539-
&& !is_need_verification;
540-
541-
return !has_been_authenticated;
534+
const { needs_verification } = authentication;
535+
return needs_verification.length && (needs_verification.includes('identity') || needs_verification.includes('document'));
542536
};
543537

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

0 commit comments

Comments
 (0)