Skip to content

feat(tron): use the shared Asset UI component - #429

Merged
Julink-eth merged 2 commits into
mainfrom
feat/tron-shared-asset
Oct 9, 2026
Merged

Julink-eth merged 2 commits into
mainfrom
feat/tron-shared-asset

Conversation

@Julink-eth

Copy link
Copy Markdown
Contributor

Explanation

Tron integration of the shared Asset component (#418). The confirmation fee rows now render the shared Asset, replacing the local Asset component, which is deleted along with its question-mark.svg. The bandwidth/energy icon mapping (connect/flash) and fiat formatting stay at the call site.
Tron tests now load SVGs with the shared jest.svg-transformer.js instead of the empty stub, which the shared icon requires.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

@Julink-eth
Julink-eth requested review from a team as code owners October 8, 2026 13:49
@Julink-eth
Julink-eth deployed to default-branch October 8, 2026 13:49 — with GitHub Actions Active

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

Static review found no blocking issues in the focused migration or supporting changes; tests were not executed.

0 open findings

What changed in this PR

Migrates Tron confirmation fee rows to the shared Asset component introduced in #418, continuing confirmation UI consolidation.

Changes:

  • Preserves Tron-specific resource icons and fiat formatting.
  • Removes the local component and fallback SVG.
  • Adds rendering tests and switches Jest to the shared SVG transformer.
File Description
yarn.lock Removes Tron’s SVG stub dependency.
packages/​tron-wallet-snap/​src/​ui/​confirmation/​components/​Fees.tsx Uses shared Asset with locally prepared display values.
packages/​tron-wallet-snap/​src/​ui/​confirmation/​components/​Fees.test.tsx Tests fiat, loading, icons, and fee ordering.
packages/​tron-wallet-snap/​src/​ui/​confirmation/​components/​Asset/​Asset.tsx Deletes the local component.
packages/​tron-wallet-snap/​snap.manifest.json Updates the bundle checksum.
packages/​tron-wallet-snap/​package.json Removes jest-transform-stub.
packages/​tron-wallet-snap/​jest.config.js Uses the shared SVG transformer and raises coverage thresholds.
packages/​tron-wallet-snap/​images/​question-mark.svg Deletes the redundant fallback icon.
packages/​tron-wallet-snap/​CHANGELOG.md Documents the shared-component migration.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

@sonarqubecloud

sonarqubecloud Bot commented Oct 8, 2026

Copy link
Copy Markdown

@Julink-eth

Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Preview builds have been published. Learn how to use preview builds in other projects.

Expand for full list of packages and versions.
@metamask-previews/bitcoin-wallet-snap@3.1.0-preview-b0808d9
@metamask-previews/snap-networks-utils@1.0.0-preview-b0808d9
@metamask-previews/solana-wallet-snap@7.0.0-preview-b0808d9
@metamask-previews/stellar-wallet-snap@1.1.1-preview-b0808d9
@metamask-previews/tron-wallet-snap@4.0.0-preview-b0808d9

@Battambang Battambang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

gj, also by removing the local Asset/Asset.tsx

@Julink-eth
Julink-eth added this pull request to the merge queue Oct 9, 2026
Merged via the queue into main with commit 3fcaffa Oct 9, 2026
57 checks passed
@Julink-eth
Julink-eth deleted the feat/tron-shared-asset branch October 9, 2026 09:06
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