Skip to content

swap screen review#2456

Merged
rsodre merged 15 commits intomainfrom
rsodre/swap-review-screen
Mar 17, 2026
Merged

swap screen review#2456
rsodre merged 15 commits intomainfrom
rsodre/swap-review-screen

Conversation

@rsodre
Copy link
Collaborator

@rsodre rsodre commented Mar 2, 2026

  • On the confirmation screen, identify swaps in calls, by function names
  • Display buying and selling token cards, with increasing/decreasing colors
  • Added Advanced cog icon and view, displaying detailed calls contents

@vercel
Copy link

vercel bot commented Mar 2, 2026

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

Project Deployment Actions Updated (UTC)
controller-example-next Ready Ready Preview Mar 17, 2026 2:44pm
keychain Ready Ready Preview Mar 17, 2026 2:44pm
keychain-storybook Ready Ready Preview Mar 17, 2026 2:44pm

Request Review

@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

❌ Patch coverage is 59.51557% with 234 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.38%. Comparing base (34524ca) to head (34343eb).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...kages/keychain/src/components/swap/ConfirmSwap.tsx 2.63% 74 Missing ⚠️
...ain/src/components/inventory/collection/footer.tsx 0.00% 44 Missing ⚠️
...s/keychain/src/components/transaction/CallCard.tsx 8.33% 33 Missing ⚠️
packages/keychain/src/components/FeesRow.tsx 76.71% 17 Missing ⚠️
packages/keychain/src/hooks/calldata-decode.ts 80.30% 13 Missing ⚠️
...ents/inventory/collection/collectible-purchase.tsx 0.00% 12 Missing ⚠️
...nents/inventory/collection/collection-purchase.tsx 0.00% 12 Missing ⚠️
packages/keychain/src/components/Fees.tsx 85.48% 7 Missing and 2 partials ⚠️
.../src/components/transaction/ConfirmTransaction.tsx 33.33% 8 Missing ⚠️
.../src/components/transaction/TransactionSummary.tsx 87.87% 8 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2456      +/-   ##
==========================================
+ Coverage   20.98%   21.38%   +0.40%     
==========================================
  Files         319      323       +4     
  Lines       34610    34958     +348     
  Branches     1062     1097      +35     
==========================================
+ Hits         7263     7477     +214     
- Misses      27333    27465     +132     
- Partials       14       16       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rsodre rsodre changed the title swap review screen swap screen review Mar 3, 2026
@rsodre rsodre force-pushed the rsodre/swap-review-screen branch from 8d8cd9f to 94efff1 Compare March 4, 2026 12:41
@rsodre rsodre marked this pull request as ready for review March 5, 2026 11:44
@rsodre rsodre enabled auto-merge (squash) March 6, 2026 13:09
@rsodre rsodre merged commit c6a7cb7 into main Mar 17, 2026
12 checks passed
@rsodre rsodre deleted the rsodre/swap-review-screen branch March 17, 2026 21:28
@claude
Copy link
Contributor

claude bot commented Mar 17, 2026

Claude finished @rsodre's task —— View job


Documentation Analysis Complete for PR #2456

Task: Review swap screen changes and update docs only if user-facing behavior changed.

Todo List:

  • Read key changed files to understand the swap detection feature
  • Review docs repo structure and existing content
  • Determine if documentation updates are needed
  • Final determination: No documentation updates required

Analysis Summary

I've analyzed PR #2456 "swap screen review" which adds improved token swap transaction detection and display in the keychain UI.

What Changed:

  • Added automatic detection of swap transactions (transfer + multihop_swap + clear_minimum + clear)
  • New ConfirmSwap component that displays token cards with increasing/decreasing indicators
  • Advanced view toggle (gear icon) to show detailed transaction calls
  • Enhanced UI for swap confirmations with token amounts and USD values

Why No Documentation Updates Are Needed:

Following the strict documentation rules provided:

  1. DEFAULT TO NO CHANGES - This is an internal UI/UX enhancement to how transactions are displayed. The keychain automatically detects and displays swaps better - no developer action required.

  2. No User-Facing API Changes:

    • No new methods, configuration options, or APIs for developers
    • Developers continue to call account.execute() with the same transaction arrays
    • The improved swap display happens automatically in the keychain UI
    • This is purely a presentation-layer improvement
  3. Self-Explanatory UI Enhancement:

    • The feature is entirely automatic - it detects swap patterns and displays them nicely
    • Users see better visual feedback (token cards, colors, amounts)
    • No developer documentation needed since developers don't interact with this feature
  4. Internal Implementation Detail:

    • The swap detection logic (useIsSwapTransaction, useSwapTransactions) is internal to the keychain package
    • Example in examples/next/src/components/Swap.tsx is for testing/demonstration only
    • Not part of the public API that developers integrate

Conclusion:
This PR improves the transaction confirmation screen's UX when users perform token swaps through Ekubo or similar DEXes. Since it's an automatic enhancement with no developer-facing API changes, configuration options, or integration steps, no documentation updates are required.

The docs correctly describe the transaction execution flow, and this change simply makes that flow look better for swap transactions - exactly what users would expect from a "swap screen review" PR.


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.

2 participants