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

Serialize web3IdCredentials before storage, to support bigints #346

Merged

Conversation

shjortConcordium
Copy link
Contributor

Purpose

Support number properties as bigints for web3IdCredentials.

Changes

  • Create storageAccessors that stringify/parse the value when storing/loading.
  • Change VerifiableCredential storage to use new accessors.
  • sessionTemporaryVerifiableCredentialsAtom now uses loading.

Checklist

  • My code follows the style of this project.
  • The code compiles without warnings.
  • I have performed a self-review of the changes.
  • I have documented my code, in particular the intent of the
    hard-to-understand areas.
  • (If necessary) I have updated the CHANGELOG.

/**
* Factory function for creating a StorageAccessor, which serializes before storing the value and deserializes before loading the value, from a key.
*
* @param area storeage area to store value in
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @param area storeage area to store value in
* @param area storage area to store value in

@orhoj orhoj assigned shjortConcordium and unassigned orhoj Aug 23, 2023
@shjortConcordium shjortConcordium merged commit be7e52c into feature/web3-id Aug 23, 2023
4 checks passed
@shjortConcordium shjortConcordium deleted the support-bigint-in-web3Id-credentials branch August 23, 2023 12:27
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.

3 participants