From b14ecaa10f0b0cee20385d21a999e9a8b90d8ad7 Mon Sep 17 00:00:00 2001 From: Caitlin Cooling Date: Fri, 1 Mar 2024 14:35:27 +0000 Subject: [PATCH 1/2] KIWI-1638: Updates CI for DOC_NUMBER_INVALID --- src/services/GenerateVerifiableCredential.ts | 4 +--- src/tests/data/vcValidationData.json | 2 +- src/tests/unit/services/GenerateVerifiableCredential.test.ts | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/services/GenerateVerifiableCredential.ts b/src/services/GenerateVerifiableCredential.ts index d13d4f55f..2c36d6594 100644 --- a/src/services/GenerateVerifiableCredential.ts +++ b/src/services/GenerateVerifiableCredential.ts @@ -164,6 +164,7 @@ export class GenerateVerifiableCredential { case "TAMPERED": case "MISSING_HOLOGRAM": case "NO_HOLOGRAM_MOVEMENT": + case "DOC_NUMBER_INVALID": contraIndicator = "D14"; break; case "EXPIRED_DOCUMENT": @@ -172,9 +173,6 @@ export class GenerateVerifiableCredential { case "FRAUD_LIST_MATCH": contraIndicator = "F03"; break; - case "DOC_NUMBER_INVALID": - contraIndicator = "D02"; - break; case "DATA_MISMATCH": case "CHIP_DATA_INTEGRITY_FAILED": case "CHIP_SIGNATURE_VERIFICATION_FAILED": diff --git a/src/tests/data/vcValidationData.json b/src/tests/data/vcValidationData.json index 503846bc5..2c6246d87 100644 --- a/src/tests/data/vcValidationData.json +++ b/src/tests/data/vcValidationData.json @@ -184,7 +184,7 @@ "verificationScore": 0, "checkMethod": null, "failedCheck": "DOC_NUMBER_INVALID", - "ci": "D02" + "ci": "D14" }, "s0123":{ "strengthScore": null, diff --git a/src/tests/unit/services/GenerateVerifiableCredential.test.ts b/src/tests/unit/services/GenerateVerifiableCredential.test.ts index 37d71246d..c6be82043 100644 --- a/src/tests/unit/services/GenerateVerifiableCredential.test.ts +++ b/src/tests/unit/services/GenerateVerifiableCredential.test.ts @@ -220,7 +220,7 @@ describe("GenerateVerifiableCredential", () => { { reason: "COUNTERFEIT", contraIndicator: ["D14"] }, { reason: "EXPIRED_DOCUMENT", contraIndicator: ["D16"] }, { reason: "FRAUD_LIST_MATCH", contraIndicator: ["F03"] }, - { reason: "DOC_NUMBER_INVALID", contraIndicator: ["D02"] }, + { reason: "DOC_NUMBER_INVALID", contraIndicator: ["D14"] }, { reason: "TAMPERED", contraIndicator: ["D14"] }, { reason: "MISSING_HOLOGRAM", contraIndicator: ["D14"] }, { reason: "NO_HOLOGRAM_MOVEMENT", contraIndicator: ["D14"] }, From a145b299ac69c379227c615bacc534196da871aa Mon Sep 17 00:00:00 2001 From: Z-Mohamoud <110032361+Z-Mohamoud@users.noreply.github.com> Date: Tue, 5 Mar 2024 08:45:41 +0000 Subject: [PATCH 2/2] Update DOC_NUMBER_INVALID Contra Indicator (#381)