feat(solana-wallet-snap): use the shared EstimatedChanges UI component - #384
Julink-eth wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Nullable scan amounts are incorrectly displayed as zero instead of the shared component’s unknown-value state.
Review effort: Balanced
Findings: 1
What changed in this PR
Replaces Solana’s local estimated-changes UI with the shared network utility component while retaining Solana-specific formatting and localization.
Changes:
- Integrates the shared
EstimatedChangescomponent. - Removes obsolete local UI components.
- Adds wrapper tests, changelog details, and generated configuration updates.
| File | Description |
|---|---|
EstimatedChanges.tsx |
Adapts Solana scan data for the shared component. |
EstimatedChanges.test.tsx |
Tests formatting and result states. |
EstimatedChangesSkeleton.tsx |
Removes the local skeleton. |
EstimatedChangesHeader.tsx |
Removes the local header. |
AssetChange.tsx |
Removes local asset-row rendering. |
snap.manifest.json |
Updates the bundle checksum. |
jest.config.js |
Raises coverage thresholds. |
CHANGELOG.md |
Documents the UI migration. |
eslint-suppressions.json |
Removes suppressions for deleted code. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The shared component integration preserves formatting and implements the documented loading and error behavior with suitable tests.
Review effort: Balanced
Findings: None




Explanation
This PR replaces Solana’s local EstimatedChanges implementation with the shared component from @metamask/snap-networks-utils.
Behavior change
Before: Solana showed its local loading skeleton again during a background re-scan, even when estimated changes were already available.
After: Previously estimated changes stay visible during re-scans, and scan errors only show the not-available state when there are no rows to display.
Notes
Keeps Solana-specific formatting and localization in the wrapper.
Removes the now-unused Solana EstimatedChangesHeader, EstimatedChangesSkeleton, and AssetChange components.
Adds/updates tests and changelog entries.
References
Checklist