Skip to content

KYC: RealUnit registration does not satisfy the NATIONALITY_DATA step #3754

@TaprootFreak

Description

@TaprootFreak

Problem

A user who registers through the RealUnit flow provides their nationality as part of POST /v1/realunit/register/complete. The backend writes it directly to UserData via updateUserDataInternal({ nationality }) and completes a REALUNIT_REGISTRATION KYC step, bumping the KYC level to 20 (realunit.service.ts, forwardRegistration — code comment: "same as NATIONALITY_DATA step").

However, NATIONALITY_DATA is listed unconditionally in requiredKycSteps(userData) (kyc.enum.ts), and no code path marks a NATIONALITY_DATA step as done when REALUNIT_REGISTRATION completes. getNext() therefore still returns NATIONALITY_DATA as an open required step.

Effect

The RealUnit app renders whatever the API reports as currentStep. After RealUnit registration the user is shown the standalone NATIONALITY_DATA step and enters their nationality a second time — over a different endpoint and in a different format ({id} object vs. the 2-letter symbol used by /register/complete).

Suggested fix

Either:

  • have REALUNIT_REGISTRATION completion also mark NATIONALITY_DATA as done, or
  • exclude NATIONALITY_DATA from requiredKycSteps when REALUNIT_REGISTRATION is done / nationality is already set on UserData.

Context

Found during a deep audit of the realunit-app country/nationality data path. Related app PR: DFXswiss/realunit-app#519.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions