From 239fba1a41be9d158552b1a2986bf2e429d76fc3 Mon Sep 17 00:00:00 2001 From: Phat <39623143+lukachi@users.noreply.github.com> Date: Fri, 4 Oct 2024 14:03:56 +0300 Subject: [PATCH] Add nationality check option for identity proof (#73) add nationality check option for identity proof --- src/pages/ProofRequestsDemo/index.tsx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/pages/ProofRequestsDemo/index.tsx b/src/pages/ProofRequestsDemo/index.tsx index a54be53..1476762 100644 --- a/src/pages/ProofRequestsDemo/index.tsx +++ b/src/pages/ProofRequestsDemo/index.tsx @@ -176,6 +176,7 @@ enum FieldNames { Uniqueness = 'uniqueness', MinimumAge = 'minimumAge', Nationality = 'nationality', + NationalityCheck = 'nationalityCheck', EventId = 'eventId', } @@ -183,6 +184,7 @@ const DEFAULT_VALUES = { [FieldNames.Uniqueness]: true, [FieldNames.MinimumAge]: '18', [FieldNames.Nationality]: 'UKR', + [FieldNames.NationalityCheck]: false, [FieldNames.EventId]: '12345678900987654321', } @@ -208,6 +210,7 @@ function ProofAttributesStep({ uniqueness?: boolean nationality?: string event_id?: string + nationality_check?: boolean }) => { const { data } = await apiClient.post<{ id: string @@ -224,6 +227,7 @@ function ProofAttributesStep({ uniqueness: attrs.uniqueness, nationality: attrs.nationality, event_id: attrs.event_id, + ...(attrs.nationality_check && { nationality_check: true }), }, }, }, @@ -301,6 +305,7 @@ function ProofAttributesStep({ uniqueness: Boolean(formData[FieldNames.Uniqueness]), nationality: nationality ? nationality : undefined, event_id: formData[FieldNames.EventId], + nationality_check: formData[FieldNames.NationalityCheck], }) } catch (error) { ErrorHandler.process(error) @@ -349,6 +354,22 @@ function ProofAttributesStep({ )} /> + {!isLightVerification && ( + ( + + + + )} + /> + )}