fix: token consolidation fix for TRX TSS wallets#8567
Merged
Conversation
TICKET: CHALO-423 TICKET: CHALO-423
ac78f24 to
dfe6739
Compare
ravibitgo
approved these changes
Apr 20, 2026
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.
TICKET: CHALO-423
Summary
Problem
When performing token consolidation on a TRX MPC (TSS/ECDSA) wallet, the SDK's consolidateAccount flow calls verifyTransaction on the TrxToken coin instance with walletType: 'tss'. The method immediately attempts
to resolve recipients from either txParams.recipients or txPrebuild.txInfo.recipients:
For TSS consolidation:
This causes the error to be thrown unconditionally for any TRX token consolidation on a TSS wallet.
Fix
Add an early return for walletType === 'tss', consistent with how
Trx.verifyTransactionalready handles TRC20 token transfers in TSS mode.Trx.verifyTransactionhas an explicit TSS branch that decodes raw_data_hex and validates TransferContract (native TRX) against recipients. For TriggerSmartContract (all TRC20 transfers), it already returns truewithout any recipients check:
TrxToken.verifyTransaction now follows the same convention. The TSS signing protocol itself (ECDSA MPC) provides the cryptographic guarantee that the user approved the specific transaction being signed.
Impact