fix(sdk-core): add tokenName to prebuildConsolidateAccountParams whitelist#8984
Draft
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Draft
fix(sdk-core): add tokenName to prebuildConsolidateAccountParams whitelist#8984bitgo-ai-agent-dev[bot] wants to merge 1 commit into
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Conversation
…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
e09b1ce to
5611cc0
Compare
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
prebuildConsolidateAccountParams()inwallet.tsdid not includetokenNamein its whitelist, so anytokenNamepassed tobuildAccountConsolidations()/sendAccountConsolidations()was silently stripped before the build request was forwarded to the BitGo APIconsolidateAccount/buildto fail with "Failed to generate consolidation transactions" for ERC-20 token consolidation on MPCv6 TSS wallets (and any other wallet type usingbuildAccountConsolidations)tokenNameto the whitelist; a new unit test verifies it is forwarded correctly to the build endpointTest plan
Account Consolidationsunit tests pass (yarn workspace bitgo run unit-test --grep consolidat)should forward tokenName to the build requestpassesyarn workspace @bitgo/express run unit-test --grep Consolidate)POST /api/v2/hteth/wallet/{walletId}/consolidateAccountwith{"tokenName":"hteth:bgerchv2","walletPassphrase":"..."}on an MPCv6 TSS wallet succeedsFixes: COINS-367
🤖 Generated with Ralph