From 031cc0e74cda8ebd11974d72b5cf58e47df1a84e Mon Sep 17 00:00:00 2001 From: Pratap Mridha Date: Thu, 8 Jun 2023 17:46:33 +0530 Subject: [PATCH 1/3] patch --- src/popup/router/pages/Account.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/popup/router/pages/Account.vue b/src/popup/router/pages/Account.vue index 8e8ce95a2..246b1970b 100644 --- a/src/popup/router/pages/Account.vue +++ b/src/popup/router/pages/Account.vue @@ -460,12 +460,12 @@ export default { } const intersectionSchemasIds = credentialSchemasIds.filter(x => schemaIds.indexOf(x) > -1) - + const intersectionSchemasIdSet=new Set(intersectionSchemasIds) if (intersectionSchemasIds.length <= 0) { throw new Error('Credential not found for schemaIds ' + schemaId.join(',')) } - if (intersectionSchemasIds.length < schemaIds.length) { + if (intersectionSchemasIdSet.size < schemaIds.length) { const rest = schemaIds.filter(x => intersectionSchemasIds.indexOf(x) < 0) const msg= rest ? rest.join(',') : '' throw new Error('Credential not found for schemaIds ' + msg) From 2715429308479d71b18964d026c9a1a36d02b629 Mon Sep 17 00:00:00 2001 From: Pratap Mridha Date: Mon, 7 Aug 2023 10:40:56 +0530 Subject: [PATCH 2/3] keyAgreementIsue --- src/popup/router/pages/SignDid.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/popup/router/pages/SignDid.vue b/src/popup/router/pages/SignDid.vue index 2375a2a3c..e8ce80c1b 100644 --- a/src/popup/router/pages/SignDid.vue +++ b/src/popup/router/pages/SignDid.vue @@ -139,7 +139,6 @@ export default { didDoc.verificationMethod.push(didDocument.verificationMethod[0]) didDoc.authentication.push(didDocument.authentication[0]); didDoc.assertionMethod.push(didDocument.assertionMethod[0]) - didDoc.keyAgreement.push(didDocument.keyAgreement[0]); didDoc.capabilityInvocation.push(didDocument.capabilityInvocation[0]); didDoc.capabilityDelegation.push(didDocument.capabilityDelegation[0]); } From 5023e96a00c28bf53d3db2f6a9bdd1072c70701f Mon Sep 17 00:00:00 2001 From: varsha766 Date: Mon, 7 Aug 2023 18:29:00 +0530 Subject: [PATCH 3/3] small fix --- src/popup/router/pages/DIDs.vue | 1 + src/popup/router/pages/Index.vue | 1 + src/popup/router/pages/SignDid.vue | 2 +- src/popup/utils/hsConstants.js | 6 +++--- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/popup/router/pages/DIDs.vue b/src/popup/router/pages/DIDs.vue index 56433fb4a..ec541ddee 100644 --- a/src/popup/router/pages/DIDs.vue +++ b/src/popup/router/pages/DIDs.vue @@ -89,6 +89,7 @@ export default { const publicKeyMultibase = kp.publicKeyMultibase const didDoc = await hsSdk.did.generate({ publicKeyMultibase }); + didDoc.keyAgreement = []; // if(didDoc.id.split(":").at(-1).length!==45){ // console.log("DID length is not 45. Trying again with index "+ (hdIndex+1)); // return this.generateNewDid(hdIndex+1); diff --git a/src/popup/router/pages/Index.vue b/src/popup/router/pages/Index.vue index 53e61571d..c9efeace3 100644 --- a/src/popup/router/pages/Index.vue +++ b/src/popup/router/pages/Index.vue @@ -163,6 +163,7 @@ export default { const publicKeyMultibase = kp.publicKeyMultibase const didDoc = await hsSdk.did.generate({ publicKeyMultibase }); + didDoc.keyAgreement = []; // const didDoc = JSON.parse(didDocString); const did = didDoc.id; diff --git a/src/popup/router/pages/SignDid.vue b/src/popup/router/pages/SignDid.vue index e8ce80c1b..5085326cc 100644 --- a/src/popup/router/pages/SignDid.vue +++ b/src/popup/router/pages/SignDid.vue @@ -97,8 +97,8 @@ export default { // Generating dummy key const kp = await this.hsSDK.did.generateKeys(); let didDoc = await this.hsSDK.did.generate({ publicKeyMultibase: kp.publicKeyMultibase}); + didDoc.keyAgreement = []; // let didDoc = JSON.parse(didDocString); - const { controllers, alsoKnownAs, serviceEndpoint } = this.didRaw; if(!Array.isArray(controllers)){ diff --git a/src/popup/utils/hsConstants.js b/src/popup/utils/hsConstants.js index 4b3f41625..460df7cb8 100644 --- a/src/popup/utils/hsConstants.js +++ b/src/popup/utils/hsConstants.js @@ -1,15 +1,15 @@ // export const SUPERHERO_HS_AUTH_BASE_URL = process.env.VUE_APP_HS_AUTH_BASE_URL || "https://stage.hypermine.in/authserver/"; // export const SUPERHERO_HS_AUTH_BASE_URL = process.env.VUE_APP_HS_AUTH_BASE_URL || "http://localhost:8001/"; export const SUPERHERO_HS_AUTH_BASE_URL = process.env.VUE_APP_HS_AUTH_BASE_URL || "https://api.fyre.hypersign.id/auth/"; -export const HS_VC_STATUS_CHECK_ATTEMPT=process.env.VUE_APP_HS_VC_STATUS_CHECK_ATTEMPT || 15; -export const HS_VC_STATUS_CHECK_INTERVAL=process.env.VUE_APP_ || 7000; +export const HS_VC_STATUS_CHECK_ATTEMPT = process.env.VUE_APP_HS_VC_STATUS_CHECK_ATTEMPT || 15; +export const HS_VC_STATUS_CHECK_INTERVAL = process.env.VUE_APP_ || 7000; export const SUPERHERO_HS_AUTH_CREDENTIAL_ISSUE_API = "hs/api/v2/register"; // change supero to hypersign later export const HS_AUTH_DID_URL = SUPERHERO_HS_AUTH_BASE_URL + "hs/api/v2/authdid" export const HS_VC_STATUS_PATH = SUPERHERO_HS_AUTH_BASE_URL + "hs/api/v2/vcstatus" export const WALLET_URL = process.env.VUE_APP_WALLET_URL || "https://wallet-jagrat.hypersign.id/"; // export const WALLET_URL=process.env.VUE_APP_WALLET_URL || "http://localhost:4999/chrome/popup/popup#/"; // export const BUSINESSCARD_SCHEMA='sch:hid:testnet:zFc19V37DPHmdysvPDJJdeHQTLPWzuSVZq4Tn9GPXcEj2:1.0' -export const BUSINESSCARD_SCHEMA='sch:hid:testnet:zDt4ZZwoA5vBV3t7tn8Y4KNKjH4fBDkwYxLfQK1nJC8BR:1.0' +export const BUSINESSCARD_SCHEMA = 'sch:hid:testnet:zDt4ZZwoA5vBV3t7tn8Y4KNKjH4fBDkwYxLfQK1nJC8BR:1.0' export const AUTH_SERVER_FAUCET_PATH = "hs/api/v2/faucet/" export const WALLET_TYPE = process.env.VUE_APP_HS_WALLET_TYPE || "web" export const HYPERSIGN_AUTH_PROVIDER = {