Skip to content

fix(sdk-coin-trx): allow non-TSS TRC20 consolidation without recipients#9278

Draft
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
masterfrom
spt-100-fix-usdt-trx-consolidation
Draft

fix(sdk-coin-trx): allow non-TSS TRC20 consolidation without recipients#9278
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
masterfrom
spt-100-fix-usdt-trx-consolidation

Conversation

@bitgo-ai-agent-dev

Copy link
Copy Markdown

What

  • In TrxToken.verifyTransaction, the non-TSS path now returns true when txParams.recipients is absent or empty, treating the transaction as a server-determined consolidation transfer.
  • Aligned the non-TSS txInfo cast to use optional chaining (?.) for consistency with the TSS path.
  • Added two new tests for the non-TSS consolidation path: empty-array recipients and fully-absent recipients.

Why

  • BitOasis customers cannot consolidate USDT:TRX balances on non-TSS wallets. Consolidation transactions are server-determined and carry no 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.
  • The identical issue was previously fixed for TSS wallets in COINS-392 (sdk-coin-trx@3.16.4). This PR applies the same fix to the non-TSS path, which was missed at the time.

Test plan

  • node --test dist/test/unit/trxToken.js — all 9 tests pass (6 TSS + 3 non-TSS)
  • New non-TSS consolidation tests cover empty-array and absent recipients scenarios

Ticket: SPT-100

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
bitgo-ai-agent-dev Bot force-pushed the spt-100-fix-usdt-trx-consolidation branch from 60e785c to b27f2eb Compare July 16, 2026 14:42
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.

0 participants