Skip to content

feat(connect): add VoteWitnessContract support for Tron signing#26394

Merged
martykan merged 1 commit into
developfrom
connect-tron-vote-witness
Apr 6, 2026
Merged

feat(connect): add VoteWitnessContract support for Tron signing#26394
martykan merged 1 commit into
developfrom
connect-tron-vote-witness

Conversation

@martykan
Copy link
Copy Markdown
Member

@martykan martykan commented Apr 6, 2026

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)
Test Type
Quarantine test: "Account metadata,google - watches files over time" 🙋 manual
Quarantine test: "Account metadata,dropbox - watches files over time" 🙋 manual
Quarantine test: "Trading - Sell inputs,Sell form % inputs and limits" 🙋 manual
Quarantine test: "Trading - Sell inputs,Sell form % inputs and limits" 🙋 manual
Quarantine test: "Multiple sessions,Session overtaken by another" 🙋 manual
Quarantine CANARY test: "Trading - Sell BTC" 🙋 manual
Quarantine test: "Recovery T2T1 - dry run,Recovery after partial recovery" 🙋 manual

Updated: 2026-04-06T18:52:41.949Z • 7 test(s) total

@martykan martykan added this to Suite Apr 6, 2026
@martykan martykan added connect Connect API related (ie. fee calculation) tron labels Apr 6, 2026
@martykan martykan moved this to 🔎 Needs review in Suite Apr 6, 2026
@martykan martykan requested a review from Copilot April 6, 2026 18:35
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 VoteWitnessContract to the corresponding protobuf message.
  • Add a custom Method_InvalidParameter error 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.

Comment thread packages/connect/src/api/tron/api/tronSignTransaction.ts Outdated
Comment thread packages/connect/src/api/tron/api/tronSignTransaction.ts Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread packages/connect/src/api/tron/api/tronSignTransaction.ts
@martykan martykan marked this pull request as ready for review April 6, 2026 19:04
@martykan martykan merged commit 4f6a52b into develop Apr 6, 2026
60 of 61 checks passed
@martykan martykan deleted the connect-tron-vote-witness branch April 6, 2026 19:22
@trezor-bot trezor-bot Bot moved this from 🔎 Needs review to 🤝 Needs QA in Suite Apr 6, 2026
@evgenysl evgenysl moved this from 🤝 Needs QA to 🧪 QA In progress in Suite Apr 13, 2026
@evgenysl
Copy link
Copy Markdown
Contributor

QA OK

voting on tronscan.org works with Trezor connected to nu.fi
need to select Tronlink on Tronscan, but nu.fi actually opens

@evgenysl
Copy link
Copy Markdown
Contributor

evgenysl commented Apr 13, 2026

Can connect Trezor with WalletConnect also, but voting result in this error:

image

@martykan the issue is only on tronscan.org's side, am I right?

@evgenysl evgenysl moved this from 🧪 QA In progress to ✅ Approved in Suite Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

connect Connect API related (ie. fee calculation) tron

Projects

Status: ✅ Approved

Development

Successfully merging this pull request may close these issues.

4 participants