Skip to content

fix(tron): refresh ref block before signing to avoid TronLink errors#376

Merged
chybisov merged 1 commit intomainfrom
fix-tron-link
Apr 29, 2026
Merged

fix(tron): refresh ref block before signing to avoid TronLink errors#376
chybisov merged 1 commit intomainfrom
fix-tron-link

Conversation

@tomiiide
Copy link
Copy Markdown
Contributor

Which Linear task is linked to this PR?

https://linear.app/lifi-linear/issue/EMB-346

Why was it implemented this way?

A stale ref_block_hash from the API response falls outside TronLink's recent-block window and surfaces as a generic "Network mismatched" error. Re-anchor via getCurrentRefBlockParams and rebuild the transaction through newTxID so TronWeb recomputes a consistent txID / raw_data_hex pair and drops the deserializer's non-protobuf artifacts.

Visual showcase (Screenshots or Videos)

If applicable, attach screenshots, GIFs, or videos to showcase the functionality, UI changes, or bug fixes.

Checklist before requesting a review

  • I have performed a self-review and testing of my code.
  • This pull request is focused and addresses a single problem.
  • If this PR modifies the SDK API or adds new features that require documentation, I have updated the documentation in the public-docs repository.

A stale `ref_block_hash` from the API response falls outside TronLink's
recent-block window and surfaces as a generic "Network mismatched"
error. Re-anchor via `getCurrentRefBlockParams` and rebuild the
transaction through `newTxID` so TronWeb recomputes a consistent
`txID` / `raw_data_hex` pair and drops the deserializer's non-protobuf
artifacts.
@tomiiide tomiiide self-assigned this Apr 29, 2026
@tomiiide tomiiide requested review from chybisov and effie-ms April 29, 2026 08:25
@chybisov chybisov merged commit c341572 into main Apr 29, 2026
1 of 4 checks passed
@chybisov chybisov deleted the fix-tron-link branch April 29, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants