Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Likhith/87594/trigger onfido checks for high risk client #7646

Conversation

likhith-deriv
Copy link
Contributor

Changes:

Please include a summary of the change and which issue is fixed below:

  • ...

When you need to add unit test

  • If this change disrupt current flow
  • If this change is adding new flow

When you need to add integration test

  • If components from external libraries are being used to define the flow, e.g. @deriv/components
  • If it relies on a very specific set of props with no default behavior for the current component.

Test coverage checklist (for reviewer)

  • Ensure utility / function has a test case
  • Ensure all the tests are passing

Type of change

  • Bug fix
  • New feature
  • Update feature
  • Refactor code
  • Translation to code
  • Translation to crowdin
  • Script configuration
  • Improve performance
  • Style only
  • Dependency update
  • Documentation update
  • Release

@vercel
Copy link

vercel bot commented Feb 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
deriv-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 21, 2023 5:05am

@github-actions
Copy link
Contributor

github-actions bot commented Feb 17, 2023

A production App ID was automatically generated for this PR. (log)

Click here to copy & paste above information.
- **PR**: [https://github.com/binary-com/deriv-app/pull/7646](https://github.com/binary-com/deriv-app/pull/7646)
- **URLs**:
    - **w/ App ID + Server**: https://deriv-app-git-fork-likhith-deriv-likhith-87594trigger-on-5c66e3.binary.sx?qa_server=red.binaryws.com&app_id=23881
    - **Original**: https://deriv-app-git-fork-likhith-deriv-likhith-87594trigger-on-5c66e3.binary.sx
- **App ID**: `23881`

@github-actions
Copy link
Contributor

github-actions bot commented Feb 17, 2023

🚨 Lighthouse report for the changes in this PR:

Category Score
🔺 Performance 20
🟧 Accessibility 75
🟢 Best practices 92
🟧 SEO 85
🟢 PWA 90

Lighthouse ran with https://deriv-app-git-fork-likhith-deriv-likhith-87594trigger-on-5c66e3.binary.sx/

@@ -90,7 +100,6 @@ const CFDDbviOnboarding = ({
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [is_cfd_verification_modal_visible]);

Copy link
Contributor

Choose a reason for hiding this comment

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

why did you delete here the empty line? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Honestly nt sure :)

@@ -745,6 +745,10 @@ export default class ClientStore extends BaseStore {
return this.account_status?.status?.includes('dxtrade_password_not_set');
}

get is_authenticated_with_idv_photoid() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add this to 'computed'?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, I am filtering out a particular account status and returning it. So when account status object changes, this value is re-computed

suisin-deriv
suisin-deriv previously approved these changes Feb 28, 2023
Copy link
Contributor

@suisin-deriv suisin-deriv left a comment

Choose a reason for hiding this comment

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

LGTM

yauheni-deriv
yauheni-deriv previously approved these changes Feb 28, 2023
@codecov-commenter
Copy link

codecov-commenter commented Feb 28, 2023

Codecov Report

Merging #7646 (871bc11) into master (9315d8a) will not change coverage.
The diff coverage is n/a.

❗ Current head 871bc11 differs from pull request most recent head 3586d94. Consider uploading reports for the commit 3586d94 to get more accurate results

@@          Coverage Diff           @@
##           master   #7646   +/-   ##
======================================
  Coverage    0.05%   0.05%           
======================================
  Files         117     117           
  Lines        3425    3425           
  Branches      893     893           
======================================
  Hits            2       2           
  Misses       3423    3423           

import React from 'react';
import { useStore } from '@deriv/stores';

const AccountStatusList = [
Copy link
Contributor

Choose a reason for hiding this comment

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

can we move this to a util file instead of this hook?
@farzin-deriv can we import the list from shared or util package here?

Copy link
Contributor

Choose a reason for hiding this comment

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

@matin-deriv What would be the benefit of it? 🤔

can we import the list from shared or util package here?

From @deriv/utils yes but from @deriv/shared no 👀

@coveralls
Copy link

coveralls commented Jul 3, 2023

Coverage Status

coverage: 8.858% (-0.02%) from 8.875% when pulling e653fb9 on likhith-deriv:likhith/87594/Trigger-onfido-checks-for-high-risk-client into 711d3e0 on binary-com:master.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 11, 2023

Generating Lighthouse report...

@sonarcloud
Copy link

sonarcloud bot commented Jul 21, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication


export const useIsAccountStatusPresent = (status: TAccountStatus) => {
const {
client: { account_status },
Copy link
Contributor

Choose a reason for hiding this comment

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

@likhith-deriv I think this dependency on client-store can be removed once useAccountStatus hook is introduced in this PR

matin-deriv added a commit to matin-deriv/deriv-app that referenced this pull request Aug 2, 2023
)

* feat: added onfido check for high risk client

* feat: ⚡ Incorporated POA for Labuan when status is idv_photoid

* fix: failing testcase

* feat: reverted the change

* feat: added missing config

* feat: added POA

* feat: ✨ added POA trigger for IDV+photot status

* fix: ♻️ incorporated review comments

* chore: incorporated review comments

* feat: ✨ incorporated IDV revoked status

* refactor: ♻️ refactored code

* refactor: ♻️ incorporated review comments

* feat: ♻️ incorporated review comments

* feat: resolved issue with POA

* fix: 🐛 Trigger POA only in user is idv+photo verified for labuan

* fix: ✨ incorporated Resubmission triggers

* feat: incorporated testcases

* chore: trigger rebuild

* fix: resolved issue with POA trigger for idv+photo clients

* chore: 💚 trigger build

* fix: 🐛 resolved bugs regd high risk DBVI account

* Likhith/incorporate deriv hooks (#42)

* feat: ✨ installed deriv-hooks

* feat: ✨ incorporated a new hook

* fix: ✅ added testcase

* feat: incorporated hook

* fix: 🎨 reverted changes of hooks implementation

* fix: ⚡ added testcases

---------

Co-authored-by: Matin shafiei <matin@deriv.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.