From b44de4e279f00ff309504e35233fea52813fdb59 Mon Sep 17 00:00:00 2001 From: Shiva Date: Tue, 23 Apr 2024 18:44:44 +0530 Subject: [PATCH] [INJIVER-161] Upgrade pixel pass package version Signed-off-by: Shiva --- inji-verify/package-lock.json | 17 +++++++++++++---- inji-verify/package.json | 2 +- .../Home/VerificationSection/index.tsx | 2 +- inji-verify/src/utils/did-utils.ts | 2 +- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/inji-verify/package-lock.json b/inji-verify/package-lock.json index 81cc7a05..dfe87989 100644 --- a/inji-verify/package-lock.json +++ b/inji-verify/package-lock.json @@ -10,7 +10,7 @@ "dependencies": { "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.5", - "@mosip/pixelpass": "0.1.2", + "@mosip/pixelpass": "^0.1.4", "@mui/icons-material": "^5.15.15", "@mui/material": "^5.15.14", "@mui/styled-engine": "^5.15.14", @@ -4149,11 +4149,12 @@ "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==" }, "node_modules/@mosip/pixelpass": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@mosip/pixelpass/-/pixelpass-0.1.2.tgz", - "integrity": "sha512-S4x3tNldGgqU0FkMIYHRhqhY3WC+4DjTGE1o6akI4BMbAV1ls61R/ewb1S2z8V0SMsNyV6elHxAbLsle8L6Vmg==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@mosip/pixelpass/-/pixelpass-0.1.4.tgz", + "integrity": "sha512-6Pd2MVfTN2rRf4m6ciFRmtDoZIAsDzpr8qIRQIueuYrCH0EXDoWQ6m6M0wEBl1iROPj6mimjMixJtXs7ods3BA==", "dependencies": { "base45-web": "^1.0.2", + "cbor-web": "^9.0.2", "expect": "^29.7.0", "pako": "^2.1.0", "qrcode": "^1.5.3" @@ -7213,6 +7214,14 @@ "node": ">=4" } }, + "node_modules/cbor-web": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/cbor-web/-/cbor-web-9.0.2.tgz", + "integrity": "sha512-N6gU2GsJS8RR5gy1d9wQcSPgn9FGJFY7KNvdDRlwHfz6kCxrQr2TDnrjXHmr6TFSl6Fd0FC4zRnityEldjRGvQ==", + "engines": { + "node": ">=16" + } + }, "node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", diff --git a/inji-verify/package.json b/inji-verify/package.json index f51ec044..0087e086 100644 --- a/inji-verify/package.json +++ b/inji-verify/package.json @@ -5,7 +5,7 @@ "dependencies": { "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.5", - "@mosip/pixelpass": "0.1.2", + "@mosip/pixelpass": "^0.1.4", "@mui/icons-material": "^5.15.15", "@mui/material": "^5.15.14", "@mui/styled-engine": "^5.15.14", diff --git a/inji-verify/src/components/Home/VerificationSection/index.tsx b/inji-verify/src/components/Home/VerificationSection/index.tsx index b3d67958..694ec0c1 100644 --- a/inji-verify/src/components/Home/VerificationSection/index.tsx +++ b/inji-verify/src/components/Home/VerificationSection/index.tsx @@ -43,7 +43,7 @@ const DisplayActiveStep = () => { navigate('/offline'); } setVcStatus(status); - if (vcStatus?.status === "OK") { + if (status?.status === "OK") { setVc(vc); } }) diff --git a/inji-verify/src/utils/did-utils.ts b/inji-verify/src/utils/did-utils.ts index f6d4ede5..3bc7b92e 100644 --- a/inji-verify/src/utils/did-utils.ts +++ b/inji-verify/src/utils/did-utils.ts @@ -11,7 +11,7 @@ const getDIDMethod = (did: string) => { export const resolveDid = async (did: string) => { const didMethod = getDIDMethod(did); if (SUPPORTED_DID_METHODS.indexOf(didMethod) === -1) - throw new Error("Unsupported DID method"); + throw new Error(`Unsupported DID method: ${didMethod}. DID: ${did}`); const webResolver = getResolver(); let didResolver = new Resolver({ ...webResolver