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

feat: make IdbStorage get/set methods generic #869

Merged
merged 5 commits into from
Apr 2, 2024
Merged

Conversation

hpeebles
Copy link
Contributor

@hpeebles hpeebles commented Mar 28, 2024

Description

IdbStorage is a fairly lightweight wrapper around IdbKeyVal. IdbKeyVal exposes generic get and set methods whereas IdbStorage can only get and set strings. This seems like an unnecessary restriction and means developers must come up with hacky solutions to work with types other than strings, eg. CryptoKeyPair.

How Has This Been Tested?

I have tested this with a local deployment of OpenChat where it has successfully stored and retrieved values of type string and CryptoKeyPair.

Checklist:

  • My changes follow the guidelines in CONTRIBUTING.md.
  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@hpeebles hpeebles changed the title feat: make IdbStorage generic feat: make IdbStorage get/set methods generic Mar 28, 2024
@hpeebles hpeebles marked this pull request as ready for review April 2, 2024 20:48
@hpeebles hpeebles requested a review from a team as a code owner April 2, 2024 20:48
@hpeebles hpeebles marked this pull request as draft April 2, 2024 20:48
@hpeebles hpeebles marked this pull request as ready for review April 2, 2024 21:16
@krpeacock krpeacock merged commit a51bd5b into dfinity:main Apr 2, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants