Repository navigation
fix(sdk-core): strongly type optional ECDH keychains (WCN-3735) - #10069
zahin-mohammad wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
|
Closing this follow-up because it is not required for the WCN-3735 runtime fix. The merged change already handles passkey accounts without an ECDH keychain; tightening the public TypeScript return type adds source-compatibility risk without being necessary for that behavior. |
|
|
Description
Follow-up to #10024.
getECDHKeychainreturnedPromise<any | undefined>, so TypeScript could not require callers to handle the missing-keychain result introduced for passkey-only accounts. This change:EcdhKeychaintype;getECDHKeychainso the default call returns a keychain, while{ allowMissing: true }returnsEcdhKeychain | undefined;bulkAcceptShareselect the required or optional overload explicitly;Password-verification clarification
This follow-up intentionally does not call
verifyPasswordwhen the ECDH keychain is absent. Creating a login password also creates the Elliptic Curve Diffie-Hellman (ECDH) sharing key. The affected WCN-3735 account authenticated with a passkey and had skipped both one-time password setup and ECDH creation, as tracked in CUS-2179. There is therefore no login password to verify in that branch; requiring verification would restore the original failure.Issue Number
WCN-3735
Type of change
How Has This Been Tested?
Node.js 22.23.3:
modules/sdk-core/test/unit/bitgo/wallet/walletsEncryptionVersion.ts: 14 passingmodules/sdk-api/test/unit/bitgoAPI.ts: 77 passingChecklist