Skip to content

feat(solana): use the shared Asset UI component - #427

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

Julink-eth merged 3 commits into
mainfrom
feat/solana-shared-asset

Conversation

@Julink-eth

Copy link
Copy Markdown
Contributor

Explanation

Solana integration of the shared Asset component (#418). The confirmation network fee row in TransactionDetails.tsx now renders a single <Asset> with hideIcon, replacing the hand-built skeleton/fiat/SOL layout. The snap keeps its own fiat gating and formatting; formatCrypto, which had no other callers, is deleted.
Fee-row tests were added first and passed against the old implementation, locking in the existing behavior.

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 a review from a team as a code owner October 8, 2026 12:42
@Julink-eth
Julink-eth deployed to default-branch October 8, 2026 12:42 — with GitHub Actions Active
@sonarqubecloud

sonarqubecloud Bot commented Oct 8, 2026

Copy link
Copy Markdown

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

The focused migration preserves fee formatting and loading behavior, with regression coverage and no unresolved findings.

0 open findings

What changed in this PR

Migrates Solana’s confirmation fee row to the shared Asset component introduced in #418, continuing confirmation UI consolidation.

Changes:

  • Replaces the custom fee layout while retaining Solana-specific formatting and fiat gating.
  • Adds fee-display regression tests and removes the unused formatCrypto helper.
  • Updates coverage thresholds, bundle checksum, and changelog.
File Description
packages/​solana-wallet-snap/​src/​features/​confirmation/​views/​ConfirmTransactionRequest/​ConfirmTransactionRequest.test.tsx Tests fee ordering, loading, and error states.
packages/​solana-wallet-snap/​src/​features/​confirmation/​components/​TransactionDetails/​TransactionDetails.tsx Uses shared Asset without an icon.
packages/​solana-wallet-snap/​src/​core/​utils/​formatCrypto.ts Deletes the unused formatting wrapper.
packages/​solana-wallet-snap/​src/​core/​utils/​formatCrypto.test.ts Removes tests for the deleted wrapper.
packages/​solana-wallet-snap/​snap.manifest.json Updates the bundle checksum.
packages/​solana-wallet-snap/​jest.config.js Adjusts coverage thresholds.
packages/​solana-wallet-snap/​CHANGELOG.md Documents the fee-row migration.

🧠 Review effort: Balanced


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

@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-e053d2c3
@metamask-previews/snap-networks-utils@1.0.0-preview-e053d2c3
@metamask-previews/solana-wallet-snap@7.0.0-preview-e053d2c3
@metamask-previews/stellar-wallet-snap@1.1.1-preview-e053d2c3
@metamask-previews/tron-wallet-snap@4.0.0-preview-e053d2c3

@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.

lgtm

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