Conversation
mrdanish26
approved these changes
May 13, 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-269
This pull request updates the wallet sharing logic and tests to support v2-encrypted envelopes for both ECDH keychains and wallet private keys, and ensures all decryption operations are performed asynchronously using
decryptAsync. The changes include new and updated tests to cover v2 envelope scenarios, and refactorings in the main wallet sharing code to usedecryptAsyncfor better compatibility and future-proofing.Support for v2-encrypted envelopes and async decryption:
wallets.tsto verify that bothacceptShareandbulkAcceptSharework correctly when ECDH keychains and wallet keychains use v2-encrypted envelopes. These tests cover scenarios where either or both keychains are v2-encrypted, ensuring robust support for new encryption formats. [1] [2] [3]decryptAsyncinstead of the synchronousdecrypt, reflecting the new async decryption flow and ensuring tests accurately simulate real usage. [1] [2] [3] [4] [5] [6] [7] [8] [9]Refactoring wallet sharing logic to use async decryption:
wallets.tsto useawait this.bitgo.decryptAsyncinstead of the synchronousdecryptmethod. This affects both individual and bulk share acceptance, as well as internal processing for wallet share updates. [1] [2] [3] [4] [5] [6]Promise.allfor parallel asynchronous decryption, improving performance and ensuring correct handling of async operations. [1] [2]These changes ensure the SDK is compatible with both legacy and v2-encrypted keychains, and that all cryptographic operations are performed asynchronously, which is a requirement for future encryption envelope support and for better scalability.