Skip to content

Commit

Permalink
reverted
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmanos committed Mar 5, 2024
1 parent 2d6f19e commit 0c7ff06
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/services/OpenidForPresentationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,6 @@ type PresentationDefinition = {
input_descriptors: InputDescriptor[]
}

/**
*
* @param paths example: [ '$.credentialSubject.image', '$.credentialSubject.grade', '$.credentialSubject.val.x' ]
* @returns example: { credentialSubject: { image: true, grade: true, val: { x: true } } }
*/
const generatePresentationFrameForPaths = (paths) => {
const result = {};

paths.forEach(path => {
const keys = path.split('.').slice(1); // Splitting and removing the initial '$'
let nestedObj = result;

keys.forEach((key, index) => {
if (index === keys.length - 1) {
nestedObj[key] = true; // Setting the innermost key to true
} else {
nestedObj[key] = nestedObj[key] || {}; // Creating nested object if not exists
nestedObj = nestedObj[key]; // Moving to the next nested object
}
});
});
return result;
}

const authorizationRequestSchema = z.object({
client_id: z.string(),
Expand Down

0 comments on commit 0c7ff06

Please sign in to comment.