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

Refactor StatusList2021 to use String for credential index #1422

Closed
wants to merge 3 commits into from

Conversation

itsyaasir
Copy link
Contributor

@itsyaasir itsyaasir commented Nov 12, 2024

Description of change

This PR refactors the StatusList2021 to use String for the credential index instead of usize. The internal index remains a usize to the compatibility with existing internal logic. Since we know the type is always an integer, we can parse the string to usize and use in the internal logic.

If required, I can also change the internal types to String instead of usize

Links to any relevant issues

Fixes the wrong index type in the source code; Link here

Type of change

Add an x to the boxes that are relevant to your changes.

  • Bug fix (a non-breaking change which fixes an issue)
  • Enhancement (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Fix

How the change has been tested

Describe the tests that you ran to verify your changes.
Make sure to provide instructions for the maintainer as well as any relevant configurations.

Change checklist

Add an x to the boxes that are relevant to your changes.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@UMR1352 UMR1352 added Wasm Related to Wasm bindings. Becomes part of the Wasm changelog Rust Related to the core Rust code. Becomes part of the Rust changelog. Patch Change without affecting the API that requires a patch release. Part of "Patch" section in changelog labels Nov 12, 2024
@itsyaasir itsyaasir marked this pull request as ready for review November 12, 2024 14:41
@itsyaasir itsyaasir requested a review from a team as a code owner November 12, 2024 14:41
@UMR1352
Copy link
Contributor

UMR1352 commented Nov 12, 2024

Hold up. The only issue we have with the spec is the fact that our structures serialize to an object having a field with the wrong type but the overall interface is fine. I would rather change the way the structures are serialized (using serde_aux or a custom serialization function perhaps).

@itsyaasir
Copy link
Contributor Author

Redoing it in another branch

@itsyaasir itsyaasir closed this Nov 12, 2024
@itsyaasir itsyaasir deleted the fix/status-list-wrong-type branch November 12, 2024 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Patch Change without affecting the API that requires a patch release. Part of "Patch" section in changelog Rust Related to the core Rust code. Becomes part of the Rust changelog. Wasm Related to Wasm bindings. Becomes part of the Wasm changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants