-
Notifications
You must be signed in to change notification settings - Fork 4
Swap updates #37
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
Swap updates #37
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 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>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
No description provided.