Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR refactors the swap functionality by consolidating and modernizing the swap-related hooks and components. The changes centralize swap logic into a new hooks/swap module, remove outdated swap implementations from the stake actions, and update dependencies to support the new swap architecture.
Changes:
- Consolidated swap hooks into a centralized
hooks/swapmodule with improved SDK integration - Removed redundant swap-related code from stake actions and replaced with centralized swap hooks
- Updated transaction flow to eliminate the
SetNextTransactionsFailedcallback in favor of a simplersetTransactionAPI - Added new store slices for vault validators, user roles, and allocator actions
Reviewed changes
Copilot reviewed 102 out of 111 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/hooks/swap/* | New centralized swap hooks module with token management, quotes, fees, and actions |
| src/views/SwapView/util/vault/actions/useStake/swap/* | Removed old swap implementation files |
| src/views/SwapView/util/vault/actions/useStake/* | Updated to use centralized swap hooks instead of local implementations |
| src/views/SwapView/util/vault/actions/useBoost/* | Simplified transaction error handling |
| src/views/SwapView/util/vault/actions/useUnboost/* | Simplified transaction error handling |
| src/components/Transactions/util/useLogic.ts | Simplified transaction state management API |
| src/store/store/* | Added new store slices for validators, roles, and actions |
| package.json | Added @cowprotocol/sdk-ethers-v6-adapter dependency |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/views/SwapView/util/vault/actions/useStake/useStakeSubmit/useStakeApprove.ts
Show resolved
Hide resolved
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
15ddeb8 to
53f00f1
Compare
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
dfkadyr
previously approved these changes
Jan 13, 2026
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Cast0001
approved these changes
Jan 13, 2026
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.
No description provided.