feat(connect): add VoteWitnessContract support for Tron signing#26394
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Tron VoteWitnessContract support to tronSignTransaction (to enable voting flows) and introduces a more explicit error message path for unsupported Tron contract types.
Changes:
- Extend Tron API schema union to include
VoteWitnessContract. - Update Tron signing flow to map
VoteWitnessContractto the corresponding protobuf message. - Add a custom
Method_InvalidParametererror when an unsupported contract type is encountered.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/connect/src/types/api/tron/index.ts | Adds TronVoteWitnessContract schema and includes it in the TronContracts union. |
| packages/connect/src/api/tron/api/tronSignTransaction.ts | Adds contract-type → protobuf-message mapping for vote witness signing and introduces a custom unsupported-type error path. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
13ab6dc to
c39330e
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
QA OK voting on tronscan.org works with Trezor connected to nu.fi |
|
Can connect Trezor with WalletConnect also, but voting result in this error:
|

Description
Allow voting in Tron following FW PR trezor/trezor-firmware#6524
Also improve error handling by showing a custom message for unknown contract types
Notes for QA
@EuryShadow was testing via Tronscan with staging-Nufi
🔍 Currents Test Results
🔍 Suite web test results: View in Currents
🔍 Suite native android test results: View in Currents
🔒 Quarantined E2E Tests
Trezor Suite (web) — 7 test(s)
Updated: 2026-04-06T18:52:41.949Z • 7 test(s) total