Skip to content

test(sdk-core): cover TradingNetwork request contracts - #9417

Open
mmcshinsky-bitgo wants to merge 9 commits into
masterfrom
pt-000000-trading-network-tests
Open

test(sdk-core): cover TradingNetwork request contracts#9417
mmcshinsky-bitgo wants to merge 9 commits into
masterfrom
pt-000000-trading-network-tests

Conversation

@mmcshinsky-bitgo

@mmcshinsky-bitgo mmcshinsky-bitgo commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add focused TradingNetwork request-contract coverage.
  • Verify enterprise scoping, signed allocation preparation, generated identifiers, and allocation/deallocation payload routing.

Test plan

  • Run yarn workspace @bitgo/sdk-core unit-test -- --grep TradingNetwork in CI.
  • git diff --check passes.
  • IDE linter reports no errors for the added test.

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.

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
mmcshinsky-bitgo marked this pull request as ready for review August 4, 2026 22:18
@mmcshinsky-bitgo
mmcshinsky-bitgo requested review from a team as code owners August 4, 2026 22:18
@mmcshinsky-bitgo
mmcshinsky-bitgo requested review from Charan-Ratlan and s84krish and removed request for Charan-Ratlan August 4, 2026 22:18
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.

1 participant