@koraidv/react 1.8.0 → 1.8.1
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 +6 -2
- package/dist/index.mjs +6 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1586,6 +1586,7 @@ function ProcessingScreen({ steps, autoAdvance = true }) {
|
|
|
1586
1586
|
] });
|
|
1587
1587
|
}
|
|
1588
1588
|
function computeScoreBreakdown(verification) {
|
|
1589
|
+
const source = verification.metadata?.source ?? "";
|
|
1589
1590
|
const livenessPercent = Math.round(
|
|
1590
1591
|
verification.scores?.liveness ?? verification.livenessVerification?.livenessScore ?? 0
|
|
1591
1592
|
);
|
|
@@ -1598,9 +1599,12 @@ function computeScoreBreakdown(verification) {
|
|
|
1598
1599
|
const selfiePercent = Math.round(
|
|
1599
1600
|
verification.scores?.faceMatch ?? verification.faceVerification?.matchScore ?? 0
|
|
1600
1601
|
);
|
|
1602
|
+
const isWeb = source === "web";
|
|
1603
|
+
const passFloor = isWeb ? 65 : 75;
|
|
1604
|
+
const borderlineFloor = isWeb ? 40 : 50;
|
|
1601
1605
|
function getStatus(score) {
|
|
1602
|
-
if (score >=
|
|
1603
|
-
if (score >=
|
|
1606
|
+
if (score >= passFloor) return "pass";
|
|
1607
|
+
if (score >= borderlineFloor) return "borderline";
|
|
1604
1608
|
return "fail";
|
|
1605
1609
|
}
|
|
1606
1610
|
function getMessage(status) {
|
package/dist/index.mjs
CHANGED
|
@@ -1537,6 +1537,7 @@ function ProcessingScreen({ steps, autoAdvance = true }) {
|
|
|
1537
1537
|
] });
|
|
1538
1538
|
}
|
|
1539
1539
|
function computeScoreBreakdown(verification) {
|
|
1540
|
+
const source = verification.metadata?.source ?? "";
|
|
1540
1541
|
const livenessPercent = Math.round(
|
|
1541
1542
|
verification.scores?.liveness ?? verification.livenessVerification?.livenessScore ?? 0
|
|
1542
1543
|
);
|
|
@@ -1549,9 +1550,12 @@ function computeScoreBreakdown(verification) {
|
|
|
1549
1550
|
const selfiePercent = Math.round(
|
|
1550
1551
|
verification.scores?.faceMatch ?? verification.faceVerification?.matchScore ?? 0
|
|
1551
1552
|
);
|
|
1553
|
+
const isWeb = source === "web";
|
|
1554
|
+
const passFloor = isWeb ? 65 : 75;
|
|
1555
|
+
const borderlineFloor = isWeb ? 40 : 50;
|
|
1552
1556
|
function getStatus(score) {
|
|
1553
|
-
if (score >=
|
|
1554
|
-
if (score >=
|
|
1557
|
+
if (score >= passFloor) return "pass";
|
|
1558
|
+
if (score >= borderlineFloor) return "borderline";
|
|
1555
1559
|
return "fail";
|
|
1556
1560
|
}
|
|
1557
1561
|
function getMessage(status) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koraidv/react",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"description": "Kora IDV React Components for Identity Verification",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"test": "vitest run"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@koraidv/core": "^1.8.
|
|
24
|
+
"@koraidv/core": "^1.8.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/react": "^18.2.0",
|