Skip to content

Commit

Permalink
[COJ]/likhith/COJ-563/fix poa pending error on MT5 (#13038)
Browse files Browse the repository at this point in the history
* fix: mt5-poa-pending-error

* fix: issue with verified status
  • Loading branch information
likhith-deriv authored Jan 22, 2024
1 parent da76043 commit 52b9120
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/shared/src/utils/cfd/cfd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -511,10 +511,13 @@ export const getMT5AccountTitle = ({ account_type, jurisdiction }: TGetMT5Accoun
export const isPOARequiredForMT5 = (account_status: GetAccountStatus, jurisdiction_shortcode: string) => {
const { authentication } = account_status;

if (authentication?.attempts?.latest?.service !== 'idv') {
return !['pending', 'verified'].includes(authentication?.document?.status ?? '');
if (authentication?.attempts?.latest?.service === 'idv') {
if (authentication?.document?.status === 'pending') {
return false;
}
// @ts-expect-error as the prop authenticated_with_idv is not yet present in GetAccountStatus
return !authentication?.document?.authenticated_with_idv[jurisdiction_shortcode];
}

// @ts-expect-error as the prop authenticated_with_idv is not yet present in GetAccountStatus
return !authentication?.document?.authenticated_with_idv[jurisdiction_shortcode];
return !['pending', 'verified'].includes(authentication?.document?.status ?? '');
};

1 comment on commit 52b9120

@vercel
Copy link

@vercel vercel bot commented on 52b9120 Jan 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

deriv-app – ./

deriv-app.vercel.app
deriv-app-git-master.binary.sx
binary.sx
deriv-app.binary.sx

Please sign in to comment.