-
-
Notifications
You must be signed in to change notification settings - Fork 606
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
Device Dehydration | js-sdk: store/load dehydration key #4599
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only did a quick review because the the compiler errors are distracting
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable to me, but definitely needs review from people who are closer to the dehydrated devices design.
ad24628
to
e1fb7b8
Compare
d10fd42
to
a1e0bbf
Compare
const cachedKey = await this.getCachedKey(); | ||
if (!cachedKey) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest an early return here, to avoid two calls to getCachedKey
and dodgy !
operators
const cachedKey = await this.getCachedKey(); | |
if (!cachedKey) { | |
const cachedKey = await this.getCachedKey(); | |
if (cachedKey) return cachedKey; |
(can we then inline getCachedKey
?)
SonarCloud says I need to add more tests, but should be ready for re-review otherwise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few nits, but LGTM.
And yes, looks like we need a test for loading the key from 4S?
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Fixes #4483
Added basic support to cache created keys and read from store instead of in memory.
Then adding some basic signalling to DeviceDehydrationManager, helpful for tests and also for apps to have some feedback on device rehydration (reports progress for example)
Checklist
public
/exported
symbols have accurate TSDoc documentation.