Skip to content

Conversation

@himanshuchawla009
Copy link
Member

No description provided.

@himanshuchawla009 himanshuchawla009 requested review from ieow and matthiasgeihs and removed request for matthiasgeihs October 2, 2024 06:58
}

// wait for prefetch completed before setup tkey
const [loginResponse] = await Promise.all([loginPromise, prefetchTssPublicKeys]);
Copy link
Contributor

Choose a reason for hiding this comment

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

is there speed improvement ?

Copy link
Member Author

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.

}

// wait for prefetch completed before setup tkey
const [loginResponse] = await Promise.all([loginPromise, prefetchTssPublicKeys]);
Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Contributor

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?

Copy link
Member Author

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.

@himanshuchawla009 himanshuchawla009 merged commit dd7e13e into master Oct 3, 2024
@himanshuchawla009 himanshuchawla009 deleted the fix/optimizations branch October 3, 2024 03:11
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.

4 participants