Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ interface ImageAnalyticsPayload {
/**
* Image width, or null if unknown
*/
width: number | null;
width?: number | null;
/**
* Image height, or null if unknown
*/
height: number | null;
height?: number | null;
/**
* Mime type, or null if unknown
*/
Expand All @@ -65,7 +65,7 @@ interface ImageAnalyticsPayload {
/**
* Fingerprint of the image, base64 encoded SHA-256 digest
*/
fingerprint: string | null;
fingerprint?: string | null;

/**
*
Expand Down Expand Up @@ -512,9 +512,16 @@ function AcuantCapture(
}

function onSelfieCaptureSuccess({ image }: { image: string }) {
const analyticsPayload: ImageAnalyticsPayload = getAddAttemptAnalyticsPayload({
mimeType: 'image/jpeg', // Acuant Web SDK currently encodes all images as JPEG
source: 'acuant',
size: getDecodedBase64ByteSize(image),
failedImageResubmission: false,
});

trackEvent('idv_sdk_selfie_image_added', { captureAttempts });

onChangeAndResetError(image);
onChangeAndResetError(image, analyticsPayload);
onResetFailedCaptureAttempts();
setIsCapturingEnvironment(false);
}
Expand Down