Skip to content

fix: use query params for GET address-book methods#9084

Merged
seanchen0818 merged 1 commit into
masterfrom
GN-2899-sdk-getconnections-query-params
Jun 24, 2026
Merged

fix: use query params for GET address-book methods#9084
seanchen0818 merged 1 commit into
masterfrom
GN-2899-sdk-getconnections-query-params

Conversation

@seanchen0818

Copy link
Copy Markdown
Contributor

Summary

  • getConnections, getListingEntryContacts, and getListingEntryDirectory were using .send(params) on GET requests, which puts params in the request body — ignored by the server
  • Replaced with .query(params) so filters are correctly sent as URL query params
  • Confirmed against address-book service SDK spec: all three routes define filters under query:, not body:

Test plan

  • Added unit tests for all three GET methods verifying .query() is called with the provided params
  • All 4 tests pass locally

Fixes GN-2899

🤖 Generated with Claude Code

@seanchen0818 seanchen0818 requested review from a team as code owners June 22, 2026 21:14
@linear-code

linear-code Bot commented Jun 22, 2026

Copy link
Copy Markdown

GN-2899

seanchen0818 added a commit that referenced this pull request Jun 22, 2026
- Replace .send(params) with .query(params) in getConnections,
  getListingEntryContacts, and getListingEntryDirectory so filters
  are sent as URL query params rather than request body

GN-2899 #9084
@seanchen0818 seanchen0818 force-pushed the GN-2899-sdk-getconnections-query-params branch from c2e224f to f8046c6 Compare June 22, 2026 21:16
@pranishnepal

Copy link
Copy Markdown
Contributor

Tests failing

seanchen0818 added a commit that referenced this pull request Jun 22, 2026
- Replace .send(params) with .query(params) in getConnections,
  getListingEntryContacts, and getListingEntryDirectory so filters
  are sent as URL query params rather than request body

GN-2899 #9084
@seanchen0818 seanchen0818 force-pushed the GN-2899-sdk-getconnections-query-params branch from f8046c6 to 1b395d7 Compare June 22, 2026 21:39
seanchen0818 added a commit that referenced this pull request Jun 22, 2026
- Replace .send(params) with .query(params) in getConnections,
  getListingEntryContacts, and getListingEntryDirectory so filters
  are sent as URL query params rather than request body

GN-2899 #9084
@seanchen0818 seanchen0818 force-pushed the GN-2899-sdk-getconnections-query-params branch from 1b395d7 to e3b92e2 Compare June 22, 2026 21:57
seanchen0818 added a commit that referenced this pull request Jun 22, 2026
- Replace .send(params) with .query(params) in getConnections,
  getListingEntryContacts, and getListingEntryDirectory so filters
  are sent as URL query params rather than request body

GN-2899 #9084
@seanchen0818 seanchen0818 force-pushed the GN-2899-sdk-getconnections-query-params branch from e3b92e2 to 6ad97d5 Compare June 22, 2026 22:01
seanchen0818 added a commit that referenced this pull request Jun 22, 2026
- Replace .send(params) with .query(params) in getConnections,
  getListingEntryContacts, and getListingEntryDirectory so filters
  are sent as URL query params rather than request body

GN-2899 #9084
@seanchen0818 seanchen0818 force-pushed the GN-2899-sdk-getconnections-query-params branch from 6ad97d5 to 9fd3f2c Compare June 22, 2026 22:08

@lokesh-bitgo lokesh-bitgo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The core fix is correct — .send(params) on GET was silently dropping all filter params since most servers ignore the request body on GET requests. .query(params ?? {}) is the right approach. CI is green and the logic is sound.

Leaving a few non-blocking suggestions inline.

Comment thread modules/sdk-core/src/bitgo/address-book/address-book.ts
Comment thread modules/sdk-core/test/unit/bitgo/address-book/address-book.ts
Comment thread modules/sdk-core/test/unit/bitgo/address-book/address-book.ts
Comment thread modules/sdk-core/src/bitgo/address-book/address-book.ts
- Replace .send(params) with .query(params) in getConnections,
  getListingEntryContacts, and getListingEntryDirectory so filters
  are sent as URL query params rather than request body

GN-2899 #9084
@seanchen0818 seanchen0818 force-pushed the GN-2899-sdk-getconnections-query-params branch from 6c6b2fa to 3fe461e Compare June 23, 2026 15:17

@lokesh-bitgo lokesh-bitgo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@seanchen0818 seanchen0818 merged commit b2248b3 into master Jun 24, 2026
28 checks passed
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.

3 participants