test(sdk-core): cover TradingNetwork request contracts - #9417
Open
mmcshinsky-bitgo wants to merge 9 commits into
Open
test(sdk-core): cover TradingNetwork request contracts#9417mmcshinsky-bitgo wants to merge 9 commits into
mmcshinsky-bitgo wants to merge 9 commits into
Conversation
Add coverage for enterprise-scoped URLs and headers, signed allocation preparation, generated identifiers, and allocation endpoint payloads. WEB-000 PT-000000
Rename the TradingNetwork contract test to the repository's .test.ts convention and align its assertions with Prettier formatting. WEB-000 PT-000000
Keep the allocation currency inferred as a supported literal so the new TradingNetwork test compiles in package builds. WEB-000 PT-000000
Use the allocation amount's mutable string shape so the TradingNetwork fixture satisfies PrepareNetworkAllocationParams during package builds. WEB-000 PT-000000
Use the public trading network module boundary in the contract test instead of importing the implementation file directly. WEB-000 PT-000000
Import TradingNetwork through the sdk-core source barrel to match same-package monorepo test conventions. WEB-000 PT-000000
Exclude generated clientExternalId and nonce fields before redeclaring them optional on PrepareNetworkAllocationParams. WEB-000 PT-000000
Destructure generated allocation identifiers with defaults so the prepared allocation satisfies its required submission contract after type checking. WEB-000 PT-000000
Replace unavailable Sinon assert helpers with the assertion style used by sdk-core tests and supported by the repository's Sinon version. WEB-000 PT-000000
mmcshinsky-bitgo
marked this pull request as ready for review
August 4, 2026 22:18
mmcshinsky-bitgo
requested review from
Charan-Ratlan and
s84krish
and removed request for
Charan-Ratlan
August 4, 2026 22:18
davidkaplanbitgo
approved these changes
Aug 5, 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.
Summary
TradingNetworkrequest-contract coverage.Test plan
yarn workspace @bitgo/sdk-core unit-test -- --grep TradingNetworkin CI.git diff --checkpasses.Environment note
Local test execution was limited because Yarn is unavailable in this checkout and npm authentication prevented installing it. The source change is isolated to unit tests.