feat(solana): limit orders prototype - #7860
Draft
shoom3301 wants to merge 51 commits into
Draft
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…into solana/web-2
…into solana/web-2
…into solana/web-2
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ntend Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The tx usually lands at the edge of the blockhash validity window because the wallet-signing prompt ages the blockhash before broadcast. Re-check the signature status on a confirmation timeout instead of reporting a false failure. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
confirmTransaction's blockhash strategy throws a false block-height-exceeded error when the tx lands at the edge of the validity window. Poll getSignatureStatus until the tx lands instead, so a successful order is reported as success. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying swap-dev with
|
| Latest commit: |
3705588
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e5d7c150.swap-dev-5u6.pages.dev |
| Branch Preview URL: | https://solana-web-3.swap-dev-5u6.pages.dev |
limitofzero
added a commit
that referenced
this pull request
Jul 30, 2026
# Summary Track and surface **SPL token delegations for Solana** on the account tokens page (`/#/account/tokens`). A delegation is the Solana analogue of an EVM allowance: a token account approves the CoW settlement program (via its settlement-state PDA) to pull the sell funds at execution time. This PR fetches that delegation alongside the SPL balance in a single batched read and shows it in the token table's **Actions** column, mirroring how EVM approvals are displayed — read-only for now, since there is no manual Solana approve flow yet. <img width="917" height="438" alt="image" src="https://github.com/user-attachments/assets/f8e832f3-fb97-472e-8ce0-620dcc4e274a" /> # To Test set solana flag enabled: localStorage.setItem('IS_SOLANA_ENABLED', '1') Currently we don't have approve interface for SPL. But you can create a limit order via [this demo](https://swap-dev-git-solana-web-3-cowswap-dev.vercel.app/#/1000000001/limit/So11111111111111111111111111111111111111112/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v) with enabled solana flag([details](#7860)) and after this you will see that the source token is approved <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary - **New Features** - Added Solana token delegation allowance/delegation display in token lists, including clear “Approved ✓” and “not delegated” states (supports classic and Token-2022 tokens). - Token rows now include an on-chain explorer link for token contracts. - **Bug Fixes** - Improved Solana balance + delegation loading with unified batched fetching; EVM allowance fetching is disabled on Solana. - Allowance state is no longer persisted across sessions to prevent stale results. - **Tests** - Updated and expanded Jest coverage for Solana token-account fetching, delegation matching, and related mocks. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: cowswap-release-sync[bot] <274575433+cowswap-release-sync[bot]@users.noreply.github.com> Co-authored-by: Elena <70885163+elena-zh@users.noreply.github.com>
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.
Summary
Fixes https://linear.app/cowswap/issue/FE-318/create-a-proof-of-conecept-for-on-chain-order-creation
High-level description of what your changes are accomplishing
Add screenshots if applicable. Images are nice :)
To Test
aboutBackground
Optional: Give background information for changes you've made, that might be difficult to explain via comments