Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

fix: check presentation callback result #70

Conversation

TimoGlastra
Copy link
Contributor

We used the verified property in the presentation verification callback as return value, but noticed that presentations would still be marked as 'verified' even if the presentation was invalid.

It seems the PresetnationExchange only check if an error was thrown and didn't use the return property verified. This PR makes sure both error and verifier: false are handled.

It also adds a reason so the implementer can provide a reason why the verification failed.

I tried to write some tests for it, but somehow jest just straight up exists or only throws the error at the next test, even though I use await expect(Promise).rejects.toThrow(). Not sure what is happening here

@TimoGlastra TimoGlastra force-pushed the fix/presentation-callback-result branch from 4954159 to 6546ffc Compare January 26, 2024 11:01
@nklomp nklomp merged commit 867bbf7 into Sphereon-Opensource:develop Feb 29, 2024
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants