Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add vc/vp-jwt envelopes #123

Merged
merged 1 commit into from
Sep 27, 2024
Merged

add vc/vp-jwt envelopes #123

merged 1 commit into from
Sep 27, 2024

Conversation

PatStLouis
Copy link
Collaborator

No description provided.

Signed-off-by: PatStLouis <[email protected]>
} else if(input.type == 'EnvelopedVerifiablePresentation' ||
'EnvelopedVerifiablePresentation' in input.type
) {
input.should.have.property('id').that.does
.include('data:', `Missing id field.`);
const extractedPresentation = atob(input.id.split(',')[1].split('.')[1]);
return JSON.parse(extractedPresentation);
let extractedPresentation = atob(input.id.split(',')[1].split('.')[1]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we reuse this piece of code:

atob(input.id.split(',')[1].split('.')[1]);
and also this piece of code (which is similar to what implementations does)

extractedPresentation?.vp || extractedPresentation;

so maybe that should be a helper to the helper function here?

Copy link
Contributor

@aljones15 aljones15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving with suggestions.

@PatStLouis PatStLouis merged commit 54a8ce1 into main Sep 27, 2024
2 checks passed
@PatStLouis PatStLouis deleted the add-vc-jwt-tests-to-enveloped branch October 22, 2024 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants