File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ export const OrgIdResolver = (options: ResolverOptions): OrgIdResolverAPI => {
275
275
level : number
276
276
) : Promise < VerificationMethodPublicKey > => {
277
277
278
- const { did } = parsers . parseDid ( verificationMethodId ) ;
278
+ const { orgId : verificationMethodDid } = parsers . parseDid ( verificationMethodId ) ;
279
279
const parentDid = object . getDeepValue (
280
280
parentOrgJsonVc ,
281
281
'credentialSubject.id'
@@ -284,7 +284,7 @@ export const OrgIdResolver = (options: ResolverOptions): OrgIdResolverAPI => {
284
284
let verificationMethodResolution : DidResolutionResponse ;
285
285
let delegateVerificationMethodDefinition : VerificationMethodReference [ ] ;
286
286
287
- if ( did !== parentDid ) {
287
+ if ( verificationMethodDid !== parentDid ) {
288
288
// Resolve external verificationMethodId
289
289
verificationMethodResolution = await resolve (
290
290
verificationMethodId ,
@@ -320,9 +320,9 @@ export const OrgIdResolver = (options: ResolverOptions): OrgIdResolverAPI => {
320
320
throw new Error ( 'Unable to get verificationMethods of delegate' ) ;
321
321
}
322
322
323
- const verificationMethod = delegateVerificationMethodDefinition . filter (
323
+ const verificationMethod = delegateVerificationMethodDefinition . find (
324
324
v => v . id === verificationMethodId
325
- ) [ 0 ] ;
325
+ ) ;
326
326
327
327
if ( ! verificationMethod ) {
328
328
throw new Error ( 'Unable to get verificationMethod of delegate' ) ;
You can’t perform that action at this time.
0 commit comments