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

Feat: suppot TFGrid-KYC #3531

Open
wants to merge 49 commits into
base: development
Choose a base branch
from
Open

Feat: suppot TFGrid-KYC #3531

wants to merge 49 commits into from

Conversation

0oM4R
Copy link
Contributor

@0oM4R 0oM4R commented Oct 16, 2024

Description

Add KYC client to grid client, dashboard, and types packages.

changes:

  • grid client:

    • add kyc client
    • add kyc client to grid client
    • check if kyc verified on create name and handle methods in twinddeployment
  • types: add related error classes

  • dashboard:

    • add kyc verifier that uses iframe to connect to idenfy
    • add kyc store, init on profile, clear if no profile
    • prevent deployment if kyc is not verified, in view layout

tested scenarios:

  • try to deploy without kyc verification all deployments should be blocked
  • check twin page to see the kyc status
  • use kyc client and check its methods
  • check error handling in dashboard, toast etc, you can manipulate the headers in kyc client
  • check if you can deploy without kyc in gridclient
  • try to enter the verification process then cancel
  • try to have rejected kyc verification
  • try to verify the kyc with valid data using the dashboard
  • try to scan the qr code and continue verification process on mobile
  • make sure that the kyc status got cleaned after logout/refresh

related issues:

info issue: threefoldtech/info_grid#666

screenshots:
Screenshot from 2024-10-23 12-21-41
Screenshot from 2024-10-23 12-21-33
image
Screenshot from 2024-10-23 12-27-40
Screenshot from 2024-10-23 12-27-19
image
image

packages/grid_client/src/clients/kyc/client.ts Outdated Show resolved Hide resolved
packages/grid_client/src/clients/kyc/client.ts Outdated Show resolved Hide resolved
packages/grid_client/src/clients/kyc/client.ts Outdated Show resolved Hide resolved
packages/grid_client/src/clients/kyc/client.ts Outdated Show resolved Hide resolved
- add stringToHex and bytesFromHex to utils
- remove private utils from KYC client and use them from utils
@0oM4R 0oM4R marked this pull request as draft October 21, 2024 14:30
Copy link
Contributor

@samaradel samaradel left a comment

Choose a reason for hiding this comment

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

@0oM4R
Copy link
Contributor Author

0oM4R commented Oct 23, 2024

Screencast from 23-10-24 15:34:39.webm it keeps loading

did you build the clients ?

@samaradel
Copy link
Contributor

@0oM4R yes I did

@samaradel
Copy link
Contributor

Screencast from 23-10-24 15:34:39.webm it keeps loading

Update: It was from react extension was enabled and it works when it disabled.

- clear event listener before close kycdiloge
- get the info to kyc from config
enhance errors
enhance errors
@0oM4R 0oM4R requested a review from samaradel October 29, 2024 13:54
@0oM4R 0oM4R self-assigned this Oct 30, 2024
@0oM4R 0oM4R marked this pull request as draft October 30, 2024 09:25
@0oM4R 0oM4R marked this pull request as ready for review October 30, 2024 10:04

case status === HttpStatusCode.PaymentRequired:
return new InsufficientBalanceError(errorMessage);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

And else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

default case was removed by mistake, added now

Unverified,
InvalidResponse,
RateLimit,
badRequest,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the inconsistency? Change to BadRequest, Unauthorized!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated; thank you!

- add default case to throwkycError method
- make errors enum values consist with each other
- rephrase error message in twinDeploymentHandler
@0oM4R 0oM4R requested a review from xmonader October 30, 2024 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants