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

Request KYC endpoint #191

Closed
wants to merge 3 commits into from
Closed

Request KYC endpoint #191

wants to merge 3 commits into from

Conversation

Filip-L
Copy link
Collaborator

@Filip-L Filip-L commented May 22, 2024

Endpoint: verifier/application/request_kyc

Description:
The functionality enables Allocators to request their clients to undergo the KYC process.

The verifier/application/request_kyc endpoint checks, based on the data received (KYCRequestedInfo), the current state of the application. If the condition is met, it:

  • Updates the application's state to KYC requested.
  • Updates the record in the database.
  • Adds a comment on relevant GitHub issue and the label to kyc requested.
  • Creates a commit with the updated application state on relevant branch.

Usage Condition:
To execute this endpoint, the following conditions must be met:

  1. The application must be in the Submitted state.

Deployment Considerations:

  • new environment variable KYC_URL - variable should be set to the URL of the KYC portal

Example KYCRequestedInfo:

{
  "id": "client_address",
  "owner": "owner_name",
  "repo": "repo_name"
}

Copy link
Collaborator

@kacperzuk-neti kacperzuk-neti left a comment

Choose a reason for hiding this comment

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

There're more places where we need to handle the new state.

In fplus-lib/src/core/mod.rs, line 835, in complete_governance_review, there's a whitelist of states for which complete_governance_review can be triggered. Right now that's Submitted, AdditionalInfoRequired and AdditionalInfoSubmitted. We should add the new KYCRequested to it, so that allocator can override it if needed.

In fplus-lib/src/core/mod.rs, line 1711, we're validating the flow (read-only endpoint it seems) (part of GH Action: https://github.com/fidlabs/allocator-template/blob/main/.github/workflows/flow-validator.yml ). We should probably consider it invalid if we're in KYCRequested, but we do have current allocations.

fplus-http-server/src/router/application.rs Outdated Show resolved Hide resolved
fplus-lib/src/core/application/file.rs Show resolved Hide resolved
fplus-lib/src/core/application/mod.rs Outdated Show resolved Hide resolved
fplus-lib/src/core/mod.rs Outdated Show resolved Hide resolved
fplus-lib/src/core/mod.rs Outdated Show resolved Hide resolved
fplus-lib/src/core/mod.rs Outdated Show resolved Hide resolved
fplus-lib/src/core/mod.rs Outdated Show resolved Hide resolved
fplus-lib/src/core/mod.rs Outdated Show resolved Hide resolved
@Filip-L Filip-L marked this pull request as ready for review May 24, 2024 09:55
@kacperzuk-neti
Copy link
Collaborator

Superseded by #195

@kacperzuk-neti kacperzuk-neti deleted the request-kyc-api-endpoint branch June 6, 2024 12:32
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.

None yet

2 participants