From 70faffeda6725dbbbdb1be68f748dff1cad99627 Mon Sep 17 00:00:00 2001 From: Julian Jelfs Date: Fri, 19 Jul 2024 09:28:36 +0100 Subject: [PATCH] fix vc structure --- frontend/openchat-client/src/openchat.ts | 1 + frontend/openchat-client/src/utils/credentials.ts | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/frontend/openchat-client/src/openchat.ts b/frontend/openchat-client/src/openchat.ts index 94123a6bbd..41a2aaa7a7 100644 --- a/frontend/openchat-client/src/openchat.ts +++ b/frontend/openchat-client/src/openchat.ts @@ -1323,6 +1323,7 @@ export class OpenChat extends OpenChatAgentWorker { this.config.internetIdentityUrl, this._authPrincipal, gate.credential.issuerOrigin, + gate.credential.issuerCanisterId, gate.credential.credentialType, gate.credential.credentialArguments, this.config.iiDerivationOrigin, diff --git a/frontend/openchat-client/src/utils/credentials.ts b/frontend/openchat-client/src/utils/credentials.ts index 48014a7ab1..a14555e307 100644 --- a/frontend/openchat-client/src/utils/credentials.ts +++ b/frontend/openchat-client/src/utils/credentials.ts @@ -17,6 +17,7 @@ function getEventHandler( id: number, principal: string, issuerOrigin: string, + issuerCanisterId: string, credentialType: string, credentialArguments: unknown, derivationOrigin: string | undefined, @@ -37,6 +38,7 @@ function getEventHandler( params: { issuer: { origin: issuerOrigin, + canisterId: issuerCanisterId, }, credentialSubject: principal, credentialSpec: { @@ -100,6 +102,7 @@ export function verifyCredential( iiUrl: string, principal: string, issuerOrigin: string, + issuerCanisterId: string, credentialType: string, credentialArguments: unknown, derivationOrigin: string | undefined, @@ -112,6 +115,7 @@ export function verifyCredential( iiUrl, principal, issuerOrigin, + issuerCanisterId, credentialType, ); @@ -125,6 +129,7 @@ export function verifyCredential( reqId, principal, issuerOrigin, + issuerCanisterId, credentialType, credentialArguments, derivationOrigin,