Support nested Tron transactions from WalletConnect#958
Support nested Tron transactions from WalletConnect#958
Conversation
0xh3rman
commented
Feb 19, 2026
- Parse and handle nested Tron transaction payloads and refactor the Tron chain signer.
- TriggerSmartContract parsing now looks for raw_data either at payload.transaction.raw_data or payload.transaction.transaction.raw_data.
- The signer was reworked: introduce a TronPayload type with format detection (V1 vs Legacy), helpers to access transaction/raw_data_hex, and into_signed to attach signatures; ChainSigner::sign_data now uses this flow.
- Tests updated/added: new nested transaction fixture and a test to sign nested transactions, plus updated expected response JSON structure.
Parse and handle nested Tron transaction payloads and refactor the Tron chain signer. TriggerSmartContract parsing now looks for raw_data either at payload.transaction.raw_data or payload.transaction.transaction.raw_data. The signer was reworked: introduce a TronPayload type with format detection (V1 vs Legacy), helpers to access transaction/raw_data_hex, and into_signed to attach signatures; ChainSigner::sign_data now uses this flow. Tests updated/added: new nested transaction fixture and a test to sign nested transactions, plus updated expected response JSON structure.
Changed Files
|
Summary of ChangesHello @0xh3rman, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the Tron integration by enabling the system to correctly parse and sign nested Tron transaction payloads. It introduces a more robust and modular TronPayload structure within the ChainSigner, which intelligently detects transaction formats and streamlines the signing process. This ensures compatibility with various Tron transaction types and improves the overall reliability of Tron transaction handling. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors the Tron signer to support nested transaction payloads from WalletConnect, which is a great improvement for compatibility. The changes are well-structured, introducing a TronPayload struct to handle different payload formats and centralize signing logic. I've identified a potential high-severity issue in the new signer logic that could lead to silent failures and incorrect signatures, and a medium-severity issue in the new test where an assertion is missing. My comments provide specific suggestions to address these points.
| DEVICE_ID=$(xcrun simctl list devices available | grep iPhone | head -1 | sed 's/.*(\([A-F0-9-]*\)).*/\1/') | ||
| echo "Using Simulator: $DEVICE_ID" | ||
| xcodebuild -project tests/ios/GemTest/GemTest.xcodeproj \ | ||
| NSUnbufferedIO=YES xcodebuild -project tests/ios/GemTest/GemTest.xcodeproj \ |
There was a problem hiding this comment.
NSUnbufferedIO=YES what do we need this for?
There was a problem hiding this comment.
Trying to debug why the log wasn't lively updated, I will remove it