-
Notifications
You must be signed in to change notification settings - Fork 11
minor optimization and undefined session handle #179
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
Conversation
src/mpcCoreKit.ts
Outdated
| } | ||
|
|
||
| // wait for prefetch completed before setup tkey | ||
| const [loginResponse] = await Promise.all([loginPromise, prefetchTssPublicKeys]); |
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.
is there speed improvement ?
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.
not really, i think just for code clarify.
src/mpcCoreKit.ts
Outdated
| } | ||
|
|
||
| // wait for prefetch completed before setup tkey | ||
| const [loginResponse] = await Promise.all([loginPromise, prefetchTssPublicKeys]); |
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.
not getting this. prefetchTssPublicKeys is not a promise, so Promise.all does not apply?
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.
ah, thanks for catching. mistyped the variable name. Just pushed a fix
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.
ah, now i get it.
so we want prefetchTssPublicKeys to complete before we fetch the postbox key?
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.
yes, basically this was optimization done to create tss pub keys parallely with login to save time during tkey setup later.
No description provided.