feat: add atomic swap proposal and acceptance UI - #1005
Merged
Chucks1093 merged 3 commits intoSep 27, 2026
Merged
Conversation
|
@zainabwahab-eth Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Member
|
conflict |
# Conflicts: # src/lib/queryKeys.ts # src/pages/ProfilePage.tsx # src/routes.tsx
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #979
Summary
Implements atomic swap proposal and acceptance UI for direct key exchanges.
Features
AtomicSwapProposalForm): Create atomic swap proposals by selecting offered key/amount and desired key/amount with validation/swap/:proposalIdthat can be shared with counterpartiesAtomicSwapProposalReview): Clear display of both sides of the exchange (You receive / You give) with proposal statusAtomicSwapHistory): Completed swaps appear in Profile page under new 'Atomic Swaps' tabFiles Added
src/types/atomicSwap.ts- Types and utilities for atomic swap proposalssrc/services/atomicSwap.service.ts- Service for creating/fetching/accepting proposals and swap historysrc/hooks/useAtomicSwap.ts- React Query hooks for atomic swap operationssrc/components/common/AtomicSwapProposalForm.tsx- Proposal creation form with validationsrc/components/common/AtomicSwapProposalReview.tsx- Counterparty review pagesrc/components/common/AtomicSwapHistory.tsx- Swap history table componentsrc/pages/AtomicSwapCreatePage.tsx- Create proposal page at/swap/createsrc/pages/AtomicSwapProposalPage.tsx- Review/accept page at/swap/:proposalIdFiles Modified
src/routes.tsx- Added new routes for swap pagessrc/lib/queryKeys.ts- Added atomic swap query keyssrc/pages/LandingPage.tsx- Added 'Create Atomic Swap' button in holdings sectionsrc/pages/ProfilePage.tsx- Added 'Atomic Swaps' tab with historySecurity
Testing
Notes
The implementation uses a mock/localStorage-based service layer (
atomicSwap.service.ts) since the repository doesn't have existing contract/client infrastructure for atomic swaps. The service is structured to easily swap in real backend/contract calls when available.