fix(sdk-coin-trx): allow non-TSS TRC20 consolidation without recipients#9278
Draft
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Draft
fix(sdk-coin-trx): allow non-TSS TRC20 consolidation without recipients#9278bitgo-ai-agent-dev[bot] wants to merge 1 commit into
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Conversation
The non-TSS verifyTransaction path in TrxToken threw 'missing required property recipients' when consolidating USDT:TRX balances. Consolidation transactions are server-determined and carry no txParams.recipients, so the missing-recipients check blocked all non-TSS TRC20 consolidations. Mirror the fix already applied to the TSS path (COINS-392): when recipients is absent or empty, the transaction is treated as a server-determined transfer and structural validation (builder round- trip) is sufficient. Also align the non-TSS txInfo cast to use optional chaining (same defensive style as the TSS path) and add tests covering both the empty-array and fully-absent recipients scenarios. Ticket: SPT-100 Session-Id: 5be4c6ff-9bea-40ab-860a-1fe74a3ab82a Task-Id: 992da874-8f85-4d61-9a44-e1b35c09ea87
bitgo-ai-agent-dev
Bot
force-pushed
the
spt-100-fix-usdt-trx-consolidation
branch
from
July 16, 2026 14:42
60e785c to
b27f2eb
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.
What
TrxToken.verifyTransaction, the non-TSS path now returnstruewhentxParams.recipientsis absent or empty, treating the transaction as a server-determined consolidation transfer.txInfocast to use optional chaining (?.) for consistency with the TSS path.Why
txParams.recipients, but the non-TSS verification path threw'missing required property recipients'unconditionally when recipients were absent, blocking all non-TSS TRC20 (USDT:TRX) consolidations.Test plan
node --test dist/test/unit/trxToken.js— all 9 tests pass (6 TSS + 3 non-TSS)Ticket: SPT-100