feat: use decryptAsync/encryptAsync for remaining WRW flows#8909
Merged
Conversation
vinhkhangtieu
previously approved these changes
Jun 1, 2026
vinhkhangtieu
left a comment
There was a problem hiding this comment.
use async for decrypt and encrypt
4e665ed to
6da369e
Compare
pranavjain97
approved these changes
Jun 1, 2026
lcovar
approved these changes
Jun 1, 2026
Marzooqa
approved these changes
Jun 2, 2026
margueriteblair
approved these changes
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket: WCN-172
This pull request refactors key recovery and encryption/decryption logic across multiple coin modules and the BitGo SDK to consistently use asynchronous methods, improving reliability and compatibility with async workflows. The main changes involve replacing synchronous key derivation and encryption/decryption functions with their asynchronous counterparts, and updating method signatures and calls accordingly.
Key changes include:
Asynchronous Encryption/Decryption
decryptandencryptmethods with their asynchronous equivalents (decryptAsyncandencryptAsync) throughout the SDK, including wallet recovery, transaction signing, and key sharing operations inwallet.tsandecdsaMPCv2.ts. This ensures that encryption and decryption operations do not block the event loop and are compatible with async/await patterns. [1] [2] [3] [4] [5] [6] [7] [8] [9]Asynchronous Key Derivation
getBip32Keysto use the asynchronousgetBip32KeysAsyncfunction in UTXO, EOS, STX, TRX, and XRP coin modules, as well as related imports, to ensure proper handling of asynchronous key derivation. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]ECDSA MPCv2 Recovery Key Changes
ECDSAUtils.getMpcV2RecoveryKeySharesto include thebitgoinstance as an additional argument, ensuring that recovery key shares are generated with the correct context and access to required BitGo methods. [1] [2] [3] [4] [5] [6] [7] [8]These updates standardize async key management and cryptographic operations across the codebase, reducing the risk of blocking behavior and improving maintainability.