Open cvarjao opened 5 months ago
Still an issue. Tested with 1.0.17 Build 1740 w/ Lawyer showcase. It did not select the un-revoked lawyer credential but rather a revoked one and I was able to select the correct one manually to complete the proof. I think this should be automatic. See screen shots below.
When handling credential revocation status, it often relates to a specific date mentioned in a proof request. If the proof request doesn't include this revocation information, Credo can't determine whether a credential is revoked or not during its automatic selection process. As a result, it might pick a revoked credential that technically satisfies the request but isn’t the best choice from the user's perspective.
This automatic selection works well in scenarios without a user interface (headless mode), but it can be confusing in a UI, as showing a revoked credential can be misleading. This issue highlights why we needed to create our own custom credential selection logic, as discussed in Issue #308.
@cvarjao
We previously added logic to the proof acceptance mechanics to address #308 where Credo (formerly AFJ) was not automatically selecting the newest non-revoked credential. This logic may non longer be required as of Credo 0.4.x or 0.5.0. When we upgrade to 0.5.0 we should experiment and determine if this logic is still warranted.
If the behaviour remains the same, refactor the proof screen so the logic and code documentation better reflects its purpose. Extract logic to a helper file called credhelper, helpers, or credentias.ts for clarity. Make sure code is shared with PersonCredential.tsx so they follow the same logic.