diff --git a/src/proof/proof-service.ts b/src/proof/proof-service.ts index d86a3bb1..4dc75a49 100644 --- a/src/proof/proof-service.ts +++ b/src/proof/proof-service.ts @@ -639,7 +639,7 @@ export class ProofService implements IProofService { } let path: Path = new Path(); - if (parsedQuery.query.operator !== QueryOperators.$noop) { + if (!!parsedQuery.fieldName) { path = await Path.getContextPathKey( JSON.stringify(schema), credential.type[1], @@ -665,6 +665,12 @@ export class ProofService implements IProofService { } else { parsedQuery.query.slotIndex = 5; // value data slot b } + if (!parsedQuery.fieldName){ + const resultQuery = parsedQuery.query; + resultQuery.operator = QueryOperators.$eq; + resultQuery.values = [mtEntry]; + return { query: resultQuery }; + } if (parsedQuery.isSelectiveDisclosure) { const rawValue = mk.rawValue(path); const vp = createVerifiablePresentation( @@ -725,7 +731,7 @@ export class ProofService implements IProofService { private async parseRequest(req?: { [key: string]: unknown }): Promise { if (!req) { const query = new Query(); - query.operator = QueryOperators.$noop; + query.operator = QueryOperators.$eq; return { query, fieldName: '' }; }