-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix: swap shows incorrect token status in smart account activity #5001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: swap shows incorrect token status in smart account activity #5001
Conversation
…82-swap-shows-incorrect-token-status-in-smart-account-activity
…82-swap-shows-incorrect-token-status-in-smart-account-activity
|
The latest updates on your projects. Learn more about Vercel for GitHub.
10 Skipped Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an issue where swap transactions with more than 2 token transfers would display as multiple separate transactions instead of a single aggregated swap transaction in the activity tab.
- Implements
mergeTransfers
function to combine duplicate token transfers from gas refunds and other mechanisms - Updates activity list rendering to use merged transfers for proper swap display
- Adds comprehensive test coverage for the new merge functionality
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
packages/ui/src/utils/TransactionUtil.ts | Adds mergeTransfers function to consolidate transfers with the same token name |
packages/scaffold-ui/src/partials/w3m-activity-list/index.ts | Simplifies transaction rendering logic and applies transfer merging |
packages/ui/tests/TransactionUtil.test.ts | Adds comprehensive test suite for the new mergeTransfers function |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Coverage Report
File Coverage
|
Description
mergeTransactions
to merge corresponding internal token transfers from gas refunds and other mechanisms into a single transaction.Type of change
Associated Issues
For Linear issues: Closes APKT-3382
Showcase (Optional)
Checklist