@myazahq/kyc-sdk-react-native 2.4.0 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +151 -5
- package/android/build.gradle +35 -3
- package/android/src/main/java/com/margelo/nitro/myazakyc/HybridMyazaFaceDetector.kt +77 -0
- package/app.plugin.js +89 -8
- package/ios/HybridMyazaFaceDetector.swift +16 -3
- package/nitrogen/generated/android/c++/JHybridMyazaFaceDetectorSpec.cpp +23 -0
- package/nitrogen/generated/android/c++/JHybridMyazaFaceDetectorSpec.hpp +2 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/myazakyc/HybridMyazaFaceDetectorSpec.kt +9 -0
- package/nitrogen/generated/ios/KycSdkReactNative-Swift-Cxx-Bridge.cpp +8 -0
- package/nitrogen/generated/ios/KycSdkReactNative-Swift-Cxx-Bridge.hpp +43 -0
- package/nitrogen/generated/ios/c++/HybridMyazaFaceDetectorSpecSwift.hpp +17 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +46 -0
- package/nitrogen/generated/ios/swift/HybridMyazaFaceDetectorSpec.swift +2 -0
- package/nitrogen/generated/ios/swift/HybridMyazaFaceDetectorSpec_cxx.swift +31 -0
- package/nitrogen/generated/shared/c++/HybridMyazaFaceDetectorSpec.cpp +2 -0
- package/nitrogen/generated/shared/c++/HybridMyazaFaceDetectorSpec.hpp +3 -0
- package/package.json +14 -2
- package/src/MyazaBiometricAuth.tsx +119 -0
- package/src/MyazaKYC.tsx +12 -0
- package/src/components/CountryField.tsx +8 -0
- package/src/components/CountryRegionPicker.tsx +184 -0
- package/src/components/DashedBorder.tsx +55 -0
- package/src/components/DialCodePicker.tsx +53 -67
- package/src/components/DialCodeRow.tsx +102 -0
- package/src/components/FramedMapPicker.tsx +122 -0
- package/src/components/GeoBadge.tsx +34 -0
- package/src/components/Icon.tsx +2 -176
- package/src/components/KycFlow.tsx +60 -32
- package/src/components/LineSkeleton.tsx +100 -0
- package/src/components/MapChrome.tsx +67 -0
- package/src/components/MapPinMarker.tsx +54 -0
- package/src/components/MapPinPicker.tsx +179 -0
- package/src/components/MilestoneTrack.tsx +155 -0
- package/src/components/MultiIdProgress.tsx +107 -0
- package/src/components/MyazaInput.tsx +39 -4
- package/src/components/MyazaSelect.tsx +2 -1
- package/src/components/OptionRow.tsx +22 -3
- package/src/components/OwnershipSlider.tsx +102 -0
- package/src/components/PhoneNumberInput.tsx +45 -4
- package/src/components/PoweredBy.tsx +5 -5
- package/src/components/PresenceBlocks.tsx +153 -0
- package/src/components/StaggerIn.tsx +63 -0
- package/src/components/StepView.tsx +43 -0
- package/src/components/StickyActions.tsx +56 -0
- package/src/components/dialCodeRows.ts +64 -0
- package/src/components/glass/FloatingSheet.tsx +73 -21
- package/src/components/glass/GlassSheet.tsx +14 -2
- package/src/components/icon-map.ts +176 -0
- package/src/components/stepHeaderMeta.tsx +45 -5
- package/src/config/addressCollection.ts +125 -0
- package/src/config/biometricOptions.ts +100 -0
- package/src/config/business.ts +26 -7
- package/src/config/businessDetailsValidity.ts +52 -0
- package/src/config/businessPrefill.ts +72 -0
- package/src/config/businessSteps.ts +20 -3
- package/src/config/consentStep.ts +19 -0
- package/src/config/keyPeople.ts +111 -7
- package/src/config/keyPeopleCorporate.ts +19 -0
- package/src/config/keyPeopleOwnerTypes.ts +12 -0
- package/src/config/keyPeopleOwners.ts +26 -0
- package/src/config/keyPeoplePrefill.ts +138 -0
- package/src/config/keyPeopleSectionDefs.ts +65 -0
- package/src/config/keyPeopleSections.ts +167 -0
- package/src/config/proofOfAddress.ts +54 -11
- package/src/config/regions.ts +24 -0
- package/src/config/registrationHint.ts +1 -1
- package/src/config/stepOrder.ts +100 -6
- package/src/config/theme.ts +8 -2
- package/src/config/uploadLimits.ts +35 -0
- package/src/config/website.ts +36 -0
- package/src/config/workflowMerge.ts +16 -5
- package/src/emrtd/activeAuth.ts +100 -0
- package/src/emrtd/extras.ts +76 -0
- package/src/emrtd/files.ts +5 -0
- package/src/emrtd/index.ts +1 -0
- package/src/emrtd/read.ts +8 -1
- package/src/emrtd/session.ts +41 -0
- package/src/emrtd/stages.ts +11 -0
- package/src/index.ts +54 -1
- package/src/lib/address-current-location.ts +171 -0
- package/src/lib/address-field-modes.ts +119 -0
- package/src/lib/address-flow.ts +172 -0
- package/src/lib/address-helpers.ts +48 -0
- package/src/lib/address-line.ts +76 -0
- package/src/lib/address-pin-move.ts +97 -0
- package/src/lib/address-step-recovery.ts +63 -0
- package/src/lib/authed-image.ts +78 -0
- package/src/lib/biometric-auth.ts +52 -0
- package/src/lib/biometric-copy.ts +51 -0
- package/src/lib/captureRing.ts +83 -0
- package/src/lib/contact-recovery.ts +44 -0
- package/src/lib/country-adoption.ts +89 -0
- package/src/lib/inferred-country.ts +65 -0
- package/src/lib/livenessLayout.ts +49 -0
- package/src/lib/map-frame.ts +159 -0
- package/src/lib/map-tiles.ts +143 -0
- package/src/lib/multi-id.ts +210 -0
- package/src/lib/poa-country-gate.ts +27 -0
- package/src/lib/resubmit.ts +130 -0
- package/src/lib/result-copy.ts +116 -0
- package/src/lib/result-wait.ts +53 -0
- package/src/lib/review-map-surface.ts +26 -0
- package/src/lib/scope.ts +31 -0
- package/src/lib/screen-corners.ts +50 -0
- package/src/lib/selfie-upload-wait.ts +79 -0
- package/src/lib/step-log.ts +24 -3
- package/src/lib/street-view-fov.ts +42 -0
- package/src/lib/use-multi-id-plan.ts +29 -0
- package/src/lib/webview-available.ts +47 -0
- package/src/liveness/useLiveness.ts +6 -1
- package/src/liveness/useModelReady.ts +65 -0
- package/src/liveness/visionCameraFaceDetector.ts +35 -0
- package/src/presence/background-math.ts +100 -0
- package/src/presence/background-store.ts +82 -0
- package/src/presence/background.ts +165 -0
- package/src/presence/foreground-service.ts +193 -0
- package/src/presence/fs.ts +51 -0
- package/src/presence/geofence.ts +41 -0
- package/src/presence/math.ts +44 -0
- package/src/presence/post.ts +40 -0
- package/src/presence/report.ts +87 -0
- package/src/presence/sampler.ts +110 -0
- package/src/presence/status.ts +92 -0
- package/src/presence/store.ts +94 -0
- package/src/presence/tier.ts +36 -0
- package/src/presence/watch-wait.ts +81 -0
- package/src/screens/AddressCountryControl.tsx +115 -0
- package/src/screens/ApplicantRoleStep.tsx +9 -5
- package/src/screens/BusinessCheckPanel.tsx +89 -0
- package/src/screens/BusinessDetailsFields.tsx +112 -0
- package/src/screens/BusinessDetailsStep.tsx +133 -145
- package/src/screens/BusinessDocumentSlot.tsx +5 -5
- package/src/screens/BusinessDocumentsStep.tsx +5 -56
- package/src/screens/BusinessKeyPeopleStep.tsx +103 -71
- package/src/screens/BusinessPickedCard.tsx +86 -0
- package/src/screens/BusinessPickedSection.tsx +51 -0
- package/src/screens/BusinessRegistryPickers.tsx +67 -0
- package/src/screens/BusinessSandboxToggle.tsx +114 -0
- package/src/screens/BusinessSearch.tsx +199 -0
- package/src/screens/BusinessSearchResults.tsx +115 -0
- package/src/screens/CompanyInfoFields.tsx +91 -51
- package/src/screens/ConsentStep.tsx +37 -17
- package/src/screens/ContactActions.tsx +54 -0
- package/src/screens/ContactDestinationField.tsx +5 -0
- package/src/screens/ContactEntryPanel.tsx +75 -0
- package/src/screens/ContactVerificationStep.tsx +43 -42
- package/src/screens/CountrySelectStep.tsx +13 -147
- package/src/screens/IdTypeStep.tsx +12 -5
- package/src/screens/KeepLinksSheet.tsx +88 -0
- package/src/screens/KeyPeopleAwaitCard.tsx +204 -0
- package/src/screens/KeyPeopleAwaitList.tsx +126 -0
- package/src/screens/KeyPeoplePending.tsx +154 -0
- package/src/screens/KeyPeopleSection.tsx +162 -0
- package/src/screens/KeyPeopleSectionsList.tsx +103 -0
- package/src/screens/KeyPeopleUboExemption.tsx +72 -0
- package/src/screens/KeyPersonCard.tsx +36 -4
- package/src/screens/KeyPersonForm.tsx +195 -36
- package/src/screens/KeyPersonKindToggle.tsx +68 -0
- package/src/screens/KeyPersonOwners.tsx +109 -0
- package/src/screens/KeyPersonRoleChips.tsx +68 -0
- package/src/screens/KeyPersonSheet.tsx +92 -108
- package/src/screens/LivenessAvatar.tsx +15 -3
- package/src/screens/LivenessStep.tsx +172 -52
- package/src/screens/NfcStep.tsx +14 -0
- package/src/screens/PoaDocumentTypeList.tsx +66 -0
- package/src/screens/ProofOfAddressParts.tsx +151 -0
- package/src/screens/ProofOfAddressStep.tsx +58 -96
- package/src/screens/SubmittedBadge.tsx +25 -0
- package/src/screens/SubmittedError.tsx +64 -0
- package/src/screens/SubmittedResult.tsx +117 -0
- package/src/screens/SubmittedStep.tsx +82 -119
- package/src/screens/SubmittedSuccess.tsx +127 -0
- package/src/screens/SubmittedWaiting.tsx +45 -0
- package/src/screens/address/AddressEntranceStep.tsx +161 -0
- package/src/screens/address/AddressIntroGate.tsx +148 -0
- package/src/screens/address/AddressMapStub.tsx +50 -0
- package/src/screens/address/AddressPinStep.tsx +178 -0
- package/src/screens/address/AddressReviewStep.tsx +162 -0
- package/src/screens/address/AddressSandboxTabs.tsx +158 -0
- package/src/screens/address/AddressSearchField.tsx +115 -0
- package/src/screens/address/AddressSearchStep.tsx +94 -0
- package/src/screens/address/CurrentLocationRow.tsx +135 -0
- package/src/screens/address/DetailsSheet.tsx +175 -0
- package/src/screens/address/DetailsSheetFields.tsx +184 -0
- package/src/screens/address/EntranceDropzone.tsx +178 -0
- package/src/screens/address/EntranceFraming.tsx +66 -0
- package/src/screens/address/EntrancePills.tsx +60 -0
- package/src/screens/address/FramedStreetView.tsx +155 -0
- package/src/screens/address/IntroDisclosures.tsx +210 -0
- package/src/screens/address/LabelDecisionRow.tsx +113 -0
- package/src/screens/address/PinSummaryRow.tsx +105 -0
- package/src/screens/address/ReviewAddressBand.tsx +111 -0
- package/src/screens/address/ReviewEntranceThumbs.tsx +64 -0
- package/src/screens/address/ReviewMapPicture.tsx +106 -0
- package/src/screens/address/SearchResults.tsx +105 -0
- package/src/screens/address/SearchScreen.tsx +176 -0
- package/src/screens/address/SkipForNow.tsx +43 -0
- package/src/screens/address/StreetViewChrome.tsx +81 -0
- package/src/screens/address/detail-values.ts +22 -0
- package/src/screens/address/fix-source.ts +27 -0
- package/src/screens/address/index.ts +8 -0
- package/src/screens/address/meta.ts +44 -0
- package/src/screens/address/use-address-flow.ts +200 -0
- package/src/screens/address/use-label-pin.ts +80 -0
- package/src/screens/address/use-pin-actions.ts +192 -0
- package/src/screens/biometric/BiometricAuthFlow.tsx +170 -0
- package/src/screens/consent/model.ts +79 -10
- package/src/screens/liveness/CaptureRing.tsx +91 -0
- package/src/screens/liveness/LivenessCamera.tsx +63 -0
- package/src/screens/liveness/LivenessHandover.tsx +43 -0
- package/src/screens/liveness/LivenessOutcome.tsx +4 -3
- package/src/screens/liveness/SelfiePreview.tsx +13 -4
- package/src/screens/liveness/ShutterFlash.tsx +25 -0
- package/src/screens/liveness/index.ts +4 -0
- package/src/screens/liveness/useSelfieUpload.ts +23 -3
- package/src/screens/nfc/NfcReadProgress.tsx +1 -0
- package/src/screens/nfc/NfcScanIllustration.tsx +7 -18
- package/src/screens/useAddressPhotoAttach.ts +77 -0
- package/src/screens/useAwaitingPeople.ts +90 -0
- package/src/screens/useBusinessDocumentAttach.ts +93 -0
- package/src/screens/usePoaAttach.ts +12 -15
- package/src/services/api-biometric.ts +37 -0
- package/src/services/api-types-biometric.ts +41 -0
- package/src/services/api-types.ts +251 -3
- package/src/services/api-verify-types.ts +90 -1
- package/src/services/api.ts +237 -3
- package/src/services/deviceMetadata.ts +1 -1
- package/src/services/errors.ts +10 -2
- package/src/services/location.ts +234 -0
- package/src/services/uploadErrors.ts +30 -0
- package/src/services/workflowGate.ts +8 -0
- package/src/specs/MyazaFaceDetector.nitro.ts +29 -0
- package/src/store/address.ts +97 -0
- package/src/store/businessCheck.ts +113 -0
- package/src/store/derive.ts +44 -4
- package/src/store/kycStore.ts +352 -16
- package/src/store/serverConfig.ts +20 -0
- package/src/store/session.ts +227 -0
- package/src/store/state.ts +289 -2
- package/src/store/submit.ts +80 -13
- package/src/store/submitApplicant.ts +5 -11
- package/src/types/business.ts +23 -2
- package/src/types/config.ts +70 -2
- package/src/types/verification.ts +13 -1
- package/src/types/workflow.ts +112 -1
- package/src/screens/KeyPeopleInviteLinks.tsx +0 -239
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { Pressable, Share, View } from 'react-native';
|
|
3
|
-
import * as Clipboard from 'expo-clipboard';
|
|
4
|
-
|
|
5
|
-
import { radius, spacing } from '../config/theme';
|
|
6
|
-
import { useKyc, useTheme } from '../components/runtime';
|
|
7
|
-
import { MyazaText } from '../components/Typography';
|
|
8
|
-
import { Icon } from '../components/Icon';
|
|
9
|
-
import { CountryFlag } from '../components/CountryFlag';
|
|
10
|
-
import { regionCountryName } from '../config/regions';
|
|
11
|
-
import { KEY_PERSON_ROLE_LABELS } from '../config/keyPeople';
|
|
12
|
-
import type { KeyPersonInvite } from '../services/api-types';
|
|
13
|
-
import type { ApplicantRole, KeyPersonRole } from '../types/business';
|
|
14
|
-
|
|
15
|
-
// ---------------------------------------------------------------------------
|
|
16
|
-
// "Awaiting users" — the KYB success screen's people section. Every person the
|
|
17
|
-
// review is waiting on, grouped by role, each with a status pill; pending
|
|
18
|
-
// people carry a shareable verification link, and the APPLICANT (who verified
|
|
19
|
-
// in-flow) appears with a green Submitted pill so the picture is complete.
|
|
20
|
-
// Mirrors the web SDK's KeyPeopleInviteLinks 1:1 — mobile shares via the
|
|
21
|
-
// native sheet (reaches WhatsApp/SMS, still offers Copy inside).
|
|
22
|
-
// ---------------------------------------------------------------------------
|
|
23
|
-
|
|
24
|
-
type AwaitRole = ApplicantRole;
|
|
25
|
-
|
|
26
|
-
interface AwaitRow {
|
|
27
|
-
name: string;
|
|
28
|
-
role: AwaitRole;
|
|
29
|
-
pct: string | null;
|
|
30
|
-
country: string | null;
|
|
31
|
-
status: 'submitted' | 'pending';
|
|
32
|
-
inviteUrl?: string;
|
|
33
|
-
isApplicant?: boolean;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const ROLE_LABELS: Record<AwaitRole, string> = {
|
|
37
|
-
...KEY_PERSON_ROLE_LABELS,
|
|
38
|
-
authorized_representative: 'Authorized representative',
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const SECTIONS: Array<{ role: AwaitRole; label: string }> = [
|
|
42
|
-
{ role: 'beneficial_owner', label: 'UBOS' },
|
|
43
|
-
{ role: 'director', label: 'DIRECTORS' },
|
|
44
|
-
{ role: 'signatory', label: 'SIGNATORIES' },
|
|
45
|
-
{ role: 'shareholder', label: 'SHAREHOLDERS' },
|
|
46
|
-
{ role: 'authorized_representative', label: 'REPRESENTATIVES' },
|
|
47
|
-
];
|
|
48
|
-
|
|
49
|
-
export function KeyPeopleInviteLinks({
|
|
50
|
-
invites,
|
|
51
|
-
}: {
|
|
52
|
-
invites: KeyPersonInvite[];
|
|
53
|
-
}): React.ReactElement | null {
|
|
54
|
-
const { colors } = useTheme();
|
|
55
|
-
const app = useKyc((s) => s.businessApplication);
|
|
56
|
-
if (invites.length === 0) return null;
|
|
57
|
-
|
|
58
|
-
const rows: AwaitRow[] = [];
|
|
59
|
-
|
|
60
|
-
// The applicant themselves — verified in-flow, nothing more to do.
|
|
61
|
-
if (app.applicantRole) {
|
|
62
|
-
const self =
|
|
63
|
-
app.applicantKeyPersonIndex !== null ? app.keyPeople[app.applicantKeyPersonIndex] : null;
|
|
64
|
-
rows.push({
|
|
65
|
-
name: (self?.name ?? app.applicantName).trim() || 'You',
|
|
66
|
-
role: (self?.role ?? app.applicantRole) as AwaitRole,
|
|
67
|
-
pct: self?.ownershipPct.trim() || null,
|
|
68
|
-
country: self?.country.trim() ? self.country.trim().toUpperCase() : null,
|
|
69
|
-
status: 'submitted',
|
|
70
|
-
isApplicant: true,
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// Everyone the server minted a link for — enriched from the entered rows.
|
|
75
|
-
for (const invite of invites) {
|
|
76
|
-
const entered = app.keyPeople.find((p) => p.name.trim() === invite.name.trim());
|
|
77
|
-
rows.push({
|
|
78
|
-
name: invite.name,
|
|
79
|
-
role: (entered?.role ?? 'director') as AwaitRole,
|
|
80
|
-
pct: entered?.ownershipPct.trim() || null,
|
|
81
|
-
country: entered?.country.trim() ? entered.country.trim().toUpperCase() : null,
|
|
82
|
-
status: 'pending',
|
|
83
|
-
inviteUrl: invite.inviteUrl,
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return (
|
|
88
|
-
<View style={{ width: '100%', marginTop: spacing.lg }}>
|
|
89
|
-
<MyazaText variant="bodySmall" color={colors.textMuted} style={{ textAlign: 'center', marginBottom: spacing.md }}>
|
|
90
|
-
To complete the review, the people below must verify their identity with a KYC check.
|
|
91
|
-
Anyone with an email on file has already been sent their link.
|
|
92
|
-
</MyazaText>
|
|
93
|
-
|
|
94
|
-
{SECTIONS.map(({ role, label }) => {
|
|
95
|
-
const group = rows.filter((r) => r.role === role);
|
|
96
|
-
if (group.length === 0) return null;
|
|
97
|
-
return (
|
|
98
|
-
<View key={role} style={{ marginBottom: spacing.sm }}>
|
|
99
|
-
<MyazaText
|
|
100
|
-
variant="bodySmall"
|
|
101
|
-
color={colors.textMuted}
|
|
102
|
-
style={{ fontWeight: '600', letterSpacing: 1.2, marginBottom: spacing.xs + 2 }}
|
|
103
|
-
>
|
|
104
|
-
{label}
|
|
105
|
-
</MyazaText>
|
|
106
|
-
{group.map((row, i) => (
|
|
107
|
-
<AwaitCard key={`${role}-${i}`} row={row} />
|
|
108
|
-
))}
|
|
109
|
-
</View>
|
|
110
|
-
);
|
|
111
|
-
})}
|
|
112
|
-
|
|
113
|
-
<MyazaText variant="bodySmall" color={colors.textMuted} style={{ textAlign: 'center' }}>
|
|
114
|
-
Links are valid for 14 days.
|
|
115
|
-
</MyazaText>
|
|
116
|
-
</View>
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
function AwaitCard({ row }: { row: AwaitRow }): React.ReactElement {
|
|
121
|
-
const { colors } = useTheme();
|
|
122
|
-
const submitted = row.status === 'submitted';
|
|
123
|
-
const [copied, setCopied] = useState(false);
|
|
124
|
-
|
|
125
|
-
const share = (): void => {
|
|
126
|
-
if (!row.inviteUrl) return;
|
|
127
|
-
Share.share({ message: row.inviteUrl }).catch(() => undefined);
|
|
128
|
-
};
|
|
129
|
-
const copy = (): void => {
|
|
130
|
-
if (!row.inviteUrl) return;
|
|
131
|
-
Clipboard.setStringAsync(row.inviteUrl)
|
|
132
|
-
.then(() => {
|
|
133
|
-
setCopied(true);
|
|
134
|
-
setTimeout(() => setCopied(false), 2000);
|
|
135
|
-
})
|
|
136
|
-
.catch(() => undefined);
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
return (
|
|
140
|
-
<View
|
|
141
|
-
style={{
|
|
142
|
-
backgroundColor: colors.backgroundSecondary,
|
|
143
|
-
borderRadius: radius.md,
|
|
144
|
-
padding: spacing.md,
|
|
145
|
-
marginBottom: spacing.sm,
|
|
146
|
-
}}
|
|
147
|
-
>
|
|
148
|
-
<View style={{ flexDirection: 'row', alignItems: 'flex-start' }}>
|
|
149
|
-
<View style={{ flex: 1, minWidth: 0, marginRight: spacing.sm }}>
|
|
150
|
-
<MyazaText variant="bodyMedium" numberOfLines={1} style={{ fontWeight: '700' }}>
|
|
151
|
-
{row.name}
|
|
152
|
-
{row.isApplicant ? (
|
|
153
|
-
<MyazaText variant="bodySmall" color={colors.textMuted}>
|
|
154
|
-
{' (you)'}
|
|
155
|
-
</MyazaText>
|
|
156
|
-
) : null}
|
|
157
|
-
</MyazaText>
|
|
158
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', flexWrap: 'wrap', marginTop: 2 }}>
|
|
159
|
-
<MyazaText variant="bodySmall" color={colors.textMuted}>
|
|
160
|
-
{ROLE_LABELS[row.role]}
|
|
161
|
-
{row.pct ? ` · ${row.pct}%` : ''}
|
|
162
|
-
{row.country ? ' · ' : ''}
|
|
163
|
-
</MyazaText>
|
|
164
|
-
{row.country ? (
|
|
165
|
-
<>
|
|
166
|
-
<CountryFlag country={row.country} size={14} />
|
|
167
|
-
<MyazaText variant="bodySmall" color={colors.textMuted}>
|
|
168
|
-
{` ${regionCountryName(row.country)}`}
|
|
169
|
-
</MyazaText>
|
|
170
|
-
</>
|
|
171
|
-
) : null}
|
|
172
|
-
</View>
|
|
173
|
-
</View>
|
|
174
|
-
<View
|
|
175
|
-
style={{
|
|
176
|
-
borderRadius: radius.full,
|
|
177
|
-
paddingHorizontal: spacing.sm + 4,
|
|
178
|
-
paddingVertical: spacing.xs,
|
|
179
|
-
backgroundColor: submitted ? colors.successBg : colors.primary100,
|
|
180
|
-
}}
|
|
181
|
-
>
|
|
182
|
-
<MyazaText
|
|
183
|
-
variant="bodySmall"
|
|
184
|
-
color={submitted ? colors.success : colors.primary}
|
|
185
|
-
style={{ fontWeight: '700', fontSize: 11, letterSpacing: 0.6 }}
|
|
186
|
-
>
|
|
187
|
-
{submitted ? 'SUBMITTED' : 'KYC PENDING'}
|
|
188
|
-
</MyazaText>
|
|
189
|
-
</View>
|
|
190
|
-
</View>
|
|
191
|
-
|
|
192
|
-
{row.status === 'pending' && row.inviteUrl ? (
|
|
193
|
-
// Both actions, since it's mobile: Copy for pasting anywhere, Share
|
|
194
|
-
// for the native sheet (WhatsApp/SMS directly).
|
|
195
|
-
<View style={{ flexDirection: 'row', marginTop: spacing.sm + 4 }}>
|
|
196
|
-
<Pressable
|
|
197
|
-
onPress={copy}
|
|
198
|
-
accessibilityRole="button"
|
|
199
|
-
accessibilityLabel={`Copy ${row.name}'s verification link`}
|
|
200
|
-
style={{
|
|
201
|
-
flex: 1,
|
|
202
|
-
flexDirection: 'row',
|
|
203
|
-
alignItems: 'center',
|
|
204
|
-
justifyContent: 'center',
|
|
205
|
-
backgroundColor: colors.primary100,
|
|
206
|
-
borderRadius: radius.full,
|
|
207
|
-
paddingVertical: spacing.sm + 2,
|
|
208
|
-
marginRight: spacing.sm,
|
|
209
|
-
}}
|
|
210
|
-
>
|
|
211
|
-
<Icon name={copied ? 'check' : 'copy'} size={15} color={colors.primary} />
|
|
212
|
-
<MyazaText variant="bodySmall" color={colors.primary} style={{ fontWeight: '700', marginLeft: spacing.xs + 2 }}>
|
|
213
|
-
{copied ? 'Copied' : 'Copy link'}
|
|
214
|
-
</MyazaText>
|
|
215
|
-
</Pressable>
|
|
216
|
-
<Pressable
|
|
217
|
-
onPress={share}
|
|
218
|
-
accessibilityRole="button"
|
|
219
|
-
accessibilityLabel={`Share ${row.name}'s verification link`}
|
|
220
|
-
style={{
|
|
221
|
-
flex: 1,
|
|
222
|
-
flexDirection: 'row',
|
|
223
|
-
alignItems: 'center',
|
|
224
|
-
justifyContent: 'center',
|
|
225
|
-
backgroundColor: colors.primary100,
|
|
226
|
-
borderRadius: radius.full,
|
|
227
|
-
paddingVertical: spacing.sm + 2,
|
|
228
|
-
}}
|
|
229
|
-
>
|
|
230
|
-
<Icon name="share" size={15} color={colors.primary} />
|
|
231
|
-
<MyazaText variant="bodySmall" color={colors.primary} style={{ fontWeight: '700', marginLeft: spacing.xs + 2 }}>
|
|
232
|
-
Share
|
|
233
|
-
</MyazaText>
|
|
234
|
-
</Pressable>
|
|
235
|
-
</View>
|
|
236
|
-
) : null}
|
|
237
|
-
</View>
|
|
238
|
-
);
|
|
239
|
-
}
|