fix(express): support Go Account walletId withdrawals - #9751
Draft
bitgo-ai-agent-dev[bot] wants to merge 7 commits into
Draft
bitgo-ai-agent-dev[bot] wants to merge 7 commits into
bitgo-ai-agent-dev[bot] wants to merge 7 commits into
Conversation
Allow sendcoins requests to use a Go Account walletId in place of an address, and pass that destination through the SDK as a recipient. This fixes the documented Go Account withdrawal flow, which was rejected by Express validation before reaching the backend.\n\nTicket: CAAS-2627 Session-Id: f7d1c24e-f50f-4e09-868c-b37a42b4a817 Task-Id: 8c59a039-fe33-48b3-8450-dd2d6ce009bc
Share the walletId-capable recipient shape with prebuild options so the SDK compiles across dependent packages, and narrow the validation path before checking recipients. This preserves the Go Account destination through all send flows without weakening address validation for malformed requests.\n\nTicket: CAAS-2627 Session-Id: f7d1c24e-f50f-4e09-868c-b37a42b4a817 Task-Id: 8c59a039-fe33-48b3-8450-dd2d6ce009bc
Keep walletId support internal to the send-to-sendMany conversion while retaining the existing prebuild recipient contract. This avoids widening address-only APIs and keeps all dependent packages type-safe.\n\nTicket: CAAS-2627 Session-Id: f7d1c24e-f50f-4e09-868c-b37a42b4a817 Task-Id: 8c59a039-fe33-48b3-8450-dd2d6ce009bc
Keep the converted recipient list non-optional after validating the send destination. This resolves the remaining SDK core type errors while preserving walletId-only Go Account withdrawals.\n\nTicket: CAAS-2627 Session-Id: f7d1c24e-f50f-4e09-868c-b37a42b4a817 Task-Id: 8c59a039-fe33-48b3-8450-dd2d6ce009bc
Model sendcoins destinations as an address-or-walletId union while retaining the existing amount and option validation. This lets Go Account requests omit address without allowing requests with no destination, preserving readable validation errors for malformed withdrawals.\n\nTicket: CAAS-2627 Session-Id: f7d1c24e-f50f-4e09-868c-b37a42b4a817 Task-Id: 8c59a039-fe33-48b3-8450-dd2d6ce009bc
Keep the sendcoins request body as the existing property map while making address optional and adding walletId. The typed route infrastructure requires property maps, so destination presence remains enforced by the handler without breaking generated route types.\n\nTicket: CAAS-2627 Session-Id: f7d1c24e-f50f-4e09-868c-b37a42b4a817 Task-Id: 8c59a039-fe33-48b3-8450-dd2d6ce009bc
Keep the existing property-map codec test pattern after retaining the typed route's compatible request shape. The regression test still covers walletId-only destinations without introducing unrelated codec type errors.\n\nTicket: CAAS-2627 Session-Id: f7d1c24e-f50f-4e09-868c-b37a42b4a817 Task-Id: 8c59a039-fe33-48b3-8450-dd2d6ce009bc
bitgo-ai-agent-dev
Bot
force-pushed
the
CAAS-2627-allow-go-account-withdrawals-walletid
branch
from
September 16, 2026 18:29
b7aebbc to
e8c5929
Compare
Contributor
|
|
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.
What
walletIdinstead ofaddress.Wallet.send()into the sendMany recipient payload.Why
The documented Go Account withdrawal flow uses
walletIdfor transfers to another Go Account. Express currently requiresaddress, so valid Testnet withdrawals fail before the request reaches the backend.Test plan
yarn --cwd modules/sdk-core buildyarn --cwd modules/express buildyarn lint-changedpasses.Ticket: CAAS-2627