Skip to content

fix(sdk-core): add tokenName to prebuildConsolidateAccountParams whitelist#8984

Draft
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
masterfrom
coins-367-fix-consolidate-account-token-name
Draft

fix(sdk-core): add tokenName to prebuildConsolidateAccountParams whitelist#8984
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
masterfrom
coins-367-fix-consolidate-account-token-name

Conversation

@bitgo-ai-agent-dev

Copy link
Copy Markdown

Summary

  • prebuildConsolidateAccountParams() in wallet.ts did not include tokenName in its whitelist, so any tokenName passed to buildAccountConsolidations() / sendAccountConsolidations() was silently stripped before the build request was forwarded to the BitGo API
  • This caused consolidateAccount/build to fail with "Failed to generate consolidation transactions" for ERC-20 token consolidation on MPCv6 TSS wallets (and any other wallet type using buildAccountConsolidations)
  • Fix adds tokenName to the whitelist; a new unit test verifies it is forwarded correctly to the build endpoint

Test plan

  • Existing Account Consolidations unit tests pass (yarn workspace bitgo run unit-test --grep consolidat)
  • New test: should forward tokenName to the build request passes
  • Express consolidation route tests pass (yarn workspace @bitgo/express run unit-test --grep Consolidate)
  • Manual: POST /api/v2/hteth/wallet/{walletId}/consolidateAccount with {"tokenName":"hteth:bgerchv2","walletPassphrase":"..."} on an MPCv6 TSS wallet succeeds

Fixes: COINS-367

🤖 Generated with Ralph

…elist

ERC-20 token consolidation via consolidateAccount/build was failing for
TSS wallets because tokenName was stripped before being forwarded to
the build API. Add tokenName to the whitelist so token consolidation
requests reach the server correctly.

Ticket: COINS-367

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Session-Id: c19bb44d-feb9-4b14-b800-daab9f206490
Task-Id: f2e56cc2-ad97-433d-9490-6c1f9f20de34
@bitgo-ai-agent-dev bitgo-ai-agent-dev Bot requested a review from dpkjnr June 10, 2026 09:09
@linear-code

linear-code Bot commented Jun 10, 2026

Copy link
Copy Markdown

COINS-367

@bitgo-ai-agent-dev bitgo-ai-agent-dev Bot force-pushed the coins-367-fix-consolidate-account-token-name branch from e09b1ce to 5611cc0 Compare June 10, 2026 09:09
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