Skip to content

Conversation

tomiir
Copy link
Collaborator

@tomiir tomiir commented Sep 11, 2025

Description

  • Fixes issue where swap transactions with more than 2 components would not properly display in the activity tab, instead showing a list of un-aggregated transactions.
  • Implements mergeTransactions to merge corresponding internal token transfers from gas refunds and other mechanisms into a single transaction.

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Associated Issues

For Linear issues: Closes APKT-3382

Showcase (Optional)

My fonts are really ugly locally :(

image

Checklist

  • Code in this PR is covered by automated tests (Unit tests, E2E tests)
  • My changes generate no new warnings
  • I have reviewed my own code
  • I have filled out all required sections
  • I have tested my changes on the preview link
  • Approver of this PR confirms that the changes are tested on the preview link

@Copilot Copilot AI review requested due to automatic review settings September 11, 2025 10:44
Copy link

linear bot commented Sep 11, 2025

Copy link

changeset-bot bot commented Sep 11, 2025

⚠️ No Changeset found

Latest commit: 5e6f89f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Sep 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
appkit-basic-html Ready Ready Preview Comment Sep 11, 2025 11:00am
appkit-demo Ready Ready Preview Comment Sep 11, 2025 11:00am
appkit-gallery Ready Ready Preview Comment Sep 11, 2025 11:00am
appkit-laboratory Ready Ready Preview Comment Sep 11, 2025 11:00am
10 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
appkit-basic-example Ignored Ignored Sep 11, 2025 11:00am
appkit-basic-sign-client-example Ignored Ignored Sep 11, 2025 11:00am
appkit-basic-up-example Ignored Ignored Sep 11, 2025 11:00am
appkit-ethers5-bera Ignored Ignored Sep 11, 2025 11:00am
appkit-nansen-demo Ignored Ignored Sep 11, 2025 11:00am
appkit-vue-solana Ignored Ignored Sep 11, 2025 11:00am
appkit-wagmi-cdn-example Ignored Ignored Sep 11, 2025 11:00am
ethereum-provider-wagmi-example Ignored Ignored Sep 11, 2025 11:00am
next-wagmi-solana-bitcoin-example Ignored Ignored Sep 11, 2025 11:00am
vue-wagmi-example Ignored Ignored Sep 11, 2025 11:00am

Copy link
Contributor

@Copilot Copilot AI left a 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.

cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

github-actions bot commented Sep 11, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 78.32% 35377 / 45168
🔵 Statements 78.32% 35377 / 45168
🔵 Functions 76.02% 3884 / 5109
🔵 Branches 86.62% 8395 / 9691
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/scaffold-ui/src/partials/w3m-activity-list/index.ts 74.05% 85.29% 77.77% 74.05% 60-66, 69, 72-75, 91-92, 105-106, 133-134, 156, 176, 206, 232, 244-251, 254-255, 261-275, 285-286, 273
packages/ui/src/utils/TransactionUtil.ts 85.5% 89.7% 94.73% 85.5% 33-34, 87-101, 140-141, 173-174
Generated in workflow #15001 for commit 5e6f89f by the Vitest Coverage Report Action

@tomiir tomiir disabled auto-merge September 11, 2025 11:44
@tomiir tomiir added this pull request to the merge queue Sep 11, 2025
@tomiir tomiir removed this pull request from the merge queue due to a manual request Sep 11, 2025
@tomiir tomiir merged commit 65e6ba1 into main Sep 11, 2025
60 of 61 checks passed
@tomiir tomiir deleted the tomas/apkt-3382-swap-shows-incorrect-token-status-in-smart-account-activity branch September 11, 2025 11:55
@github-actions github-actions bot locked and limited conversation to collaborators Sep 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants