@huma-finance/widgets 0.0.61-beta.552 → 0.0.61-beta.556
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/dist/index.js
CHANGED
|
@@ -5580,8 +5580,9 @@ function PersonaEvaluation(_ref) {
|
|
|
5580
5580
|
case IdentityVerificationStatusV2.NOT_STARTED:
|
|
5581
5581
|
{
|
|
5582
5582
|
const startVerificationResult = await IdentityServiceV2.startVerification(account, chainId, isDev);
|
|
5583
|
+
const isVerificationBypassed = startVerificationResult.status === IdentityVerificationStatusV2.BYPASSED;
|
|
5583
5584
|
setInquiryId(startVerificationResult.personaInquiryId);
|
|
5584
|
-
setKYCCopy(KYCCopies.verifyIdentity);
|
|
5585
|
+
setKYCCopy(isVerificationBypassed ? KYCCopies.verificationBypassed : KYCCopies.verifyIdentity);
|
|
5585
5586
|
setLoadingType(undefined);
|
|
5586
5587
|
break;
|
|
5587
5588
|
}
|
|
@@ -5687,7 +5688,7 @@ function PersonaEvaluation(_ref) {
|
|
|
5687
5688
|
modalElement.style.visibility = showPersonaClient ? 'hidden' : 'visible';
|
|
5688
5689
|
}
|
|
5689
5690
|
}, [showPersonaClient]);
|
|
5690
|
-
const startKYC = async () => {
|
|
5691
|
+
const startKYC = useCallback(async () => {
|
|
5691
5692
|
isActionOngoingRef.current = true;
|
|
5692
5693
|
isKYCResumedRef.current = false;
|
|
5693
5694
|
setLoadingType('startKYC');
|
|
@@ -5716,7 +5717,21 @@ function PersonaEvaluation(_ref) {
|
|
|
5716
5717
|
setLoadingType(undefined);
|
|
5717
5718
|
}
|
|
5718
5719
|
});
|
|
5719
|
-
};
|
|
5720
|
+
}, [checkVerificationStatus, inquiryId, sessionToken]);
|
|
5721
|
+
|
|
5722
|
+
// Start KYC flow directly
|
|
5723
|
+
useEffect(() => {
|
|
5724
|
+
if (verificationStatus) {
|
|
5725
|
+
switch (verificationStatus.status) {
|
|
5726
|
+
case IdentityVerificationStatusV2.NOT_STARTED:
|
|
5727
|
+
case IdentityVerificationStatusV2.CREATED:
|
|
5728
|
+
case IdentityVerificationStatusV2.PENDING:
|
|
5729
|
+
case IdentityVerificationStatusV2.EXPIRED:
|
|
5730
|
+
startKYC();
|
|
5731
|
+
break;
|
|
5732
|
+
}
|
|
5733
|
+
}
|
|
5734
|
+
}, [startKYC, verificationStatus]);
|
|
5720
5735
|
const handleAction = () => {
|
|
5721
5736
|
if (verificationStatus) {
|
|
5722
5737
|
switch (verificationStatus.status) {
|
|
@@ -5731,6 +5746,9 @@ function PersonaEvaluation(_ref) {
|
|
|
5731
5746
|
case IdentityVerificationStatusV2.APPROVED:
|
|
5732
5747
|
handleClose(verificationStatus.status);
|
|
5733
5748
|
break;
|
|
5749
|
+
case IdentityVerificationStatusV2.BYPASSED:
|
|
5750
|
+
handleClose(IdentityVerificationStatusV2.APPROVED);
|
|
5751
|
+
break;
|
|
5734
5752
|
}
|
|
5735
5753
|
}
|
|
5736
5754
|
};
|