Skip to content

refactor(signing): extract render/tron.ts - #846

Draft
graciangabriel8 wants to merge 2 commits into
refactor/718-2-render-btc-ltcfrom
refactor/718-3-render-tron
Draft

refactor(signing): extract render/tron.ts#846
graciangabriel8 wants to merge 2 commits into
refactor/718-2-render-btc-ltcfrom
refactor/718-3-render-tron

Conversation

@graciangabriel8

@graciangabriel8 graciangabriel8 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Pure-move PR 3/7 (stacked on #844), splitting Tron render logic out of render-verification.ts into render/tron.ts: renderTronVerificationBlock, tronSwissKnifeUrl, renderTronAgentTaskBlock. Imports formatArgs and truncateHex from PR1's format.ts — never back through the render-verification.ts barrel.

Range deviation from the plan: the plan named EXPLORER_TX_URL as a second Tron dependency on PR1's modules alongside truncateHex. Re-derived from the actual file: EXPLORER_TX_URL only appears inside a Tron code comment, with no runtime reference, so tron.ts imports only truncateHex (plus formatArgs, needed but not named in the plan's PR1 list — see #841).

render-verification.ts re-exports the new module via export * (no collisions) and drops the now-unused UnsignedTronTx import.

Part of #718

CI note: this stacked PR runs only cla until it is retargeted to main after its base merges — full CI fires at that point; reviewed by static trace in the meantime.

Cuts renderTronVerificationBlock, tronSwissKnifeUrl, and
renderTronAgentTaskBlock into render/tron.ts. Imports formatArgs and
truncateHex from ./format.js (PR1) — never back through the
render-verification.ts barrel, so no import cycle.

Range note: the plan flagged EXPLORER_TX_URL as a second Tron
dependency on PR1's modules, alongside truncateHex. Re-checking the
actual file, EXPLORER_TX_URL only appears inside a Tron code comment
("...same explorer URL via EXPLORER_TX_URL.tron.") — there's no
runtime reference, so tron.ts does not import it. truncateHex is the
only real cross-module dependency.

render-verification.ts re-exports the new module with `export *` (no
collisions) and drops the now-dead UnsignedTronTx import; formatArgs
and truncateHex stay imported there too since EVM's
renderVerificationBlock (not yet moved) still calls both directly.

Part of #718
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.

1 participant