feat: tron Ledger Transaction Data disabled error handling#11443
feat: tron Ledger Transaction Data disabled error handling#11443gomesalexandre merged 7 commits intodevelopfrom
Conversation
|
Warning Rate limit exceeded@gomesalexandre has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 15 minutes and 31 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThis PR updates hdwallet library dependencies to version 1.62.31-thor-tron-ledger.5 across multiple package manifests, adds error handling for a Ledger TRON-specific constraint, introduces corresponding translation strings, and switches the npm registry to a local endpoint. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Detects when Ledger users attempt to sign TRON transactions with memos (required for Thorchain/Mayachain swaps) and the "Transactions Data" setting is disabled. Follows the same ChainAdapterError pattern as blind signing errors: - ErrorHandler catches LedgerTronAllowDataDisabled by error.name - Wraps in ChainAdapterError with translation key - Shows user-friendly message matching blind signing UX Error message: "Please enable Transactions Data in your Ledger TRON app settings and try again." Requires: hdwallet-ledger with allowData validation Fixes: Cryptic 0x6a8b error for Thorchain TRON swaps on Ledger 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
16ab460 to
c63352c
Compare
Sun.io TRON swaps use complex smart contract calls with arrays that encode to 300-500+ bytes, exceeding Ledger TRON app's 250-byte protobuf field limit (CHUNK_SIZE in @ledgerhq/hw-app-trx). This causes 'Too many bytes to encode' errors when signing. Thorchain works because it uses simple transfers (68 bytes) with small memos (40-80 bytes), well under the limit. This is a fundamental Ledger hardware limitation that cannot be worked around. Sun.io quotes are now silently disabled for Ledger + TRON, similar to how GridPlus UTXO swaps are restricted. Error from Ledger: Trx.signTransaction() throws at line 142 when any single protobuf field exceeds 250 bytes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Description
Does the thing similar to blind signing for other chains.
When Ledger users attempt to sign TRON transactions with memos (required for Thorchain/Mayachain swaps), the Ledger TRON app requires the "Transactions Data" setting to be enabled. This PR implements smart validation that checks the Ledger device configuration and only blocks when truly incompatible, following the same ChainAdapterError pattern used for blind signing errors.
Issue (if applicable)
N/A
Risk
raw_data.datafield (memos)Testing
Engineering
Operations
🏁 My feature is behind a flag and doesn't require operations testing (yet)
^
Screenshots (if applicable)
https://jam.dev/c/4182b062-be21-4945-82fd-0ed58d00190f
Summary by CodeRabbit
Bug Fixes
Updates
✏️ Tip: You can customize this high-level summary in your review settings.