Skip to content

fix(sdk-coin-trx): allow TSS TRC20 consolidation when recipients absent#9002

Closed
bhavidhingra wants to merge 1 commit into
masterfrom
fix/coins-392-trx-tss-consolidation-recipients
Closed

fix(sdk-coin-trx): allow TSS TRC20 consolidation when recipients absent#9002
bhavidhingra wants to merge 1 commit into
masterfrom
fix/coins-392-trx-tss-consolidation-recipients

Conversation

@bhavidhingra

Copy link
Copy Markdown
Contributor

Summary

  • verifyTransaction TSS path crashed with TypeError: Cannot read properties of undefined (reading 'recipients') on the 3rd call — ECDSA signing passes raw protobuf txHex with no txInfo
  • Server-side TSS consolidation (trxTS.ts:buildTokenTransactionFromIntent) never populates recipients in parsedTx; non-TSS path (trx.js:getBuildTransactionResult:313) does it explicitly
  • Fix: optional-chain txInfo?.recipients + treat absent/empty recipients as consolidation (skip intent match, pass on valid ABI structure alone — Aptos pattern)

Test plan

  • New unit tests: recipients absent (undefined) and empty array both return true
  • Existing tests: correct address/amount, mismatch cases still pass
  • Manual: ttrx:usdt TSS consolidateAccount succeeds end-to-end

Fixes COINS-392

🤖 Generated with Claude Code

TrxToken.verifyTransaction TSS path had two bugs:
1. Cast (txPrebuild.txInfo as TronTxInfo).recipients throws TypeError
   when txInfo is undefined (ECDSA signing call passes raw protobuf with
   no txInfo). Fixed with optional chaining.
2. Server TSS consolidation never populates recipients — trxTS.ts
   buildTokenTransacarsedTx.recipientsand
   prebuildConsolidaludes it. Guard now
   treats absent or empty recipients as consolidation, passing on
valid
   ABI structure alone (Aptos pattern).

Ticket: COINS-392
@bhavidhingra bhavidhingra requested a review from a team as a code owner June 11, 2026 16:08
@linear-code

linear-code Bot commented Jun 11, 2026

Copy link
Copy Markdown

COINS-392

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