Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
177 commits
Select commit Hold shift + click to select a range
b48d000
feat: add state diff to hook dapp lib context
jean-neiverth Apr 24, 2025
b5aa9dd
chore: remove console log
jean-neiverth Apr 24, 2025
f4cbb89
chore: fix stateDiff typos
jean-neiverth May 5, 2025
e1f53c2
Merge branch 'develop' into jean/add-state-diff-to-hook-dapp-lib-context
jean-neiverth May 5, 2025
40ba085
chore: import useStateDiff using relative path
jean-neiverth May 8, 2025
08f37d9
Merge branch 'develop' into jean/add-state-diff-to-hook-dapp-lib-context
jean-neiverth May 8, 2025
e482e69
Merge branch 'develop' into jean/add-state-diff-to-hook-dapp-lib-context
jean-neiverth May 9, 2025
5811e55
chore: add generic function to handle pre and post hooks state diff
jean-neiverth May 12, 2025
4b47aef
Merge branch 'develop' into jean/add-state-diff-to-hook-dapp-lib-context
jean-neiverth May 12, 2025
21ef822
Merge branch 'develop' into jean/add-state-diff-to-hook-dapp-lib-context
jean-neiverth May 12, 2025
4628b18
chore(deps-update): bump flexsearch from 0.7.41 to 0.8.164 (#5685)
dependabot[bot] May 13, 2025
a34d3f7
fix: consistent naming for Order history button and page (#5683)
elena-zh May 13, 2025
8d30f01
chore(deps-update): bump tiny-invariant from 1.3.1 to 1.3.3 (#5684)
dependabot[bot] May 13, 2025
552b349
fix(dev-deps-update): bump the dev-deps group with 76 updates (#5663)
dependabot[bot] May 13, 2025
d6424ed
chore: disable trading sdk logs (#5687)
shoom3301 May 13, 2025
eb0aa48
chore(deps-update): bump swr from 2.2.0 to 2.3.3 (#5601)
dependabot[bot] May 13, 2025
0547309
chore: fix Insufficient balance styles (#5686)
shoom3301 May 13, 2025
a2cee0d
chore: security upgrade react-router from 7.5.1 to 7.5.2 (#5644)
anxolin May 13, 2025
08dac1f
Merge branch 'develop' into jean/add-state-diff-to-hook-dapp-lib-context
jean-neiverth May 13, 2025
577d6ea
fix(hooks-store): fix order balances diff key (#5681)
jean-neiverth May 13, 2025
f63e013
Merge branch 'develop' into jean/add-state-diff-to-hook-dapp-lib-context
jean-neiverth May 13, 2025
3593058
fix: update curve link (#5694)
elena-zh May 14, 2025
718c9b1
fix: update curve link (#5694)
elena-zh May 14, 2025
2a5a77a
Merge pull request #5695 from cowprotocol/release/2025-05-14
shoom3301 May 14, 2025
f056e93
chore: release main (#5696)
alfetopito May 14, 2025
dd53a12
Merge pull request #5698 from cowprotocol/main
shoom3301 May 14, 2025
12b0364
chore(deps-update): bump @fortawesome/fontawesome-svg-core (#5692)
dependabot[bot] May 14, 2025
73d7c37
Merge branch 'develop' into jean/add-state-diff-to-hook-dapp-lib-context
jean-neiverth May 14, 2025
2f87ce0
fix: do not clear url search when it's already clean (#5700)
shoom3301 May 15, 2025
7065993
feat(bridge): bridge route details UI (#5673)
shoom3301 May 15, 2025
1c6e09f
chore(deps-update): bump @visx/shape from 3.5.0 to 3.12.0 (#5691)
dependabot[bot] May 15, 2025
9f508e7
feat(appzi): disable appzi for Coinbase Wallet (#5671)
fairlighteth May 15, 2025
74f9821
fix(cowfi): update article link generation to use slug variable (#5689)
fairlighteth May 15, 2025
59d7ae2
Merge branch 'develop' into jean/add-state-diff-to-hook-dapp-lib-context
jean-neiverth May 15, 2025
42b1843
feat: add morpho lending hook to hookRegistry
jean-neiverth May 15, 2025
bbbdd6b
Revert "feat: add morpho lending hook to hookRegistry"
jean-neiverth May 15, 2025
398bbb6
feat: add morpho lending hook to hookRegistry
jean-neiverth May 15, 2025
d544cc4
fix(twap): do not reset output amount (#5707)
shoom3301 May 16, 2025
a9e2da0
fix(permit): dai permit issues (#5680)
alfetopito May 16, 2025
fba059a
chore: release main (#5704)
alfetopito May 16, 2025
cf496ee
Merge branch 'main' into develop
alfetopito May 16, 2025
3e33751
fix: handle presign tx signature for Safe via Rabby (#5711)
shoom3301 May 19, 2025
2ff6dbd
fix: fix order presign flow (#5714)
shoom3301 May 19, 2025
af8fad5
Merge pull request #5702 from cowprotocol/release/2025-05-15
shoom3301 May 19, 2025
2d03e21
chore: release main (#5719)
alfetopito May 19, 2025
9b0bf5e
Merge branch 'develop' of https://github.com/cowprotocol/cowswap into…
shoom3301 May 19, 2025
b456e56
Merge pull request #5721 from cowprotocol/main-develop-may-19
shoom3301 May 19, 2025
c5e7d9e
fix(cowfi): update revalidation paths for article layout (#5717)
fairlighteth May 20, 2025
48800e3
Merge remote-tracking branch 'origin/main' into develop
alfetopito May 20, 2025
29e12a4
chore: fix loading on windows (#5722)
alfetopito May 20, 2025
d2d0fc9
fix(bridge): distinguish tokens usd prices corr to network (#5718)
shoom3301 May 21, 2025
fd0b470
feat(bridge): add UI for bridge quote details (#5708)
fairlighteth May 21, 2025
dd92738
chore: revert ##5668
shoom3301 May 21, 2025
f5bac6c
chore: revert #5556
shoom3301 May 21, 2025
e875d59
feat(tokens): remove user-added tokens if they are in lists
shoom3301 May 21, 2025
2915da1
fix(tokens): merge token tags from different sources
shoom3301 May 21, 2025
23ce14d
chore: release main (#5728)
alfetopito May 21, 2025
bc30d5a
fix: detect EIP7702 account (#5735)
shoom3301 May 21, 2025
a75ed64
Merge pull request #5734 from cowprotocol/hotfix/2025-05-21
shoom3301 May 21, 2025
edcb803
chore: release main (#5737)
alfetopito May 21, 2025
2939365
feat: update tokens lib (#5738)
shoom3301 May 21, 2025
6a7f403
chore: release main (#5739)
alfetopito May 21, 2025
445e463
Merge pull request #5740 from cowprotocol/main
shoom3301 May 21, 2025
19b4055
fix: remove UserAddedTokensUpdater (#5744)
shoom3301 May 22, 2025
10c59fe
fix: update tokens lib (#5746)
shoom3301 May 22, 2025
1f51f40
chore: release main (#5745)
alfetopito May 22, 2025
03bad7f
Merge pull request #5747 from cowprotocol/main
shoom3301 May 22, 2025
fc7e4b5
fix(cowfi): simplify revalidation paths in route.ts (#5736)
fairlighteth May 23, 2025
f12b5ea
chore: fix cosmos fixtures (#5752)
shoom3301 May 23, 2025
68a0fe8
fix(cowfi): update comment and simplify revalidation logic in route.t…
fairlighteth May 23, 2025
b019679
Merge branch 'develop' into jean/add-state-diff-to-hook-dapp-lib-context
jean-neiverth May 23, 2025
8f60ae8
feat: consolidate OrderProgressBar module (#5754)
shoom3301 May 26, 2025
60a5b12
feat: enhance Careers page with recruitment scam warnings (#5759)
fairlighteth May 27, 2025
e3e8a8d
feat(new-networks): add support to `Avalanche` and `Polygon` networks…
cowdan May 27, 2025
a3169e4
chore: bump `@cowprotocol/permit-utils` version to `0.7.0` (#5763)
cowdan May 27, 2025
381e4b1
feat(appzi): disable appzi for Coinbase Wallet (#5671)
fairlighteth May 15, 2025
e404dbd
Merge pull request #5766 from cowprotocol/release/2025-05-28
shoom3301 May 28, 2025
8756853
chore: release main (#5750)
alfetopito May 28, 2025
12794dc
fix(cowfi): link featured articles with href (#5765)
fairlighteth May 28, 2025
e4896fd
feat(bridge): add bridge types and order type guard to explorer (#5725)
fairlighteth May 28, 2025
bf410ec
fix(twap): use indexedDB to persist state (#5771)
shoom3301 May 29, 2025
b9071ef
chore: release main (#5767)
alfetopito May 29, 2025
8249f4a
feat(bridge): add cosmos explorer configuration and global decorator …
fairlighteth May 30, 2025
a63c93e
Merge branch 'main' of https://github.com/cowprotocol/cowswap into de…
shoom3301 Jun 2, 2025
9345908
Merge pull request #5778 from cowprotocol/develop-main-2025-06-02
shoom3301 Jun 2, 2025
8a4cb5c
feat(bridge): swap and bridge refactoring + progress UI (#5755)
shoom3301 Jun 2, 2025
895fdf1
feat: consume chain data from sdk (#5773)
cowdan Jun 2, 2025
78b9bc6
fix(tokens): remove user-added tokens twice (#5748)
shoom3301 Jun 3, 2025
980e07a
feat(bridge): display bridging progress (#5772)
shoom3301 Jun 4, 2025
c8df3d8
feat(bridge): use bungee provider (#5781)
shoom3301 Jun 4, 2025
8e21739
fix(safe-wc): pass chainId to wallet_sendCalls in the body of the req…
alfetopito Jun 6, 2025
b06ba6a
fix: empty change to trigger cowswap deployment
alfetopito Jun 6, 2025
6ed1fae
chore: release main (#5794)
alfetopito Jun 6, 2025
1b62446
Merge remote-tracking branch 'origin/main' into develop
alfetopito Jun 6, 2025
f7d2c65
chore: enhance CONTRIBUTING.md with detailed contribution guidelines …
fairlighteth Jun 7, 2025
e378e84
fix: punctuation on the careers page disclaimer (#5796)
elena-zh Jun 9, 2025
403d03c
chore: update ESLint configuration to increase max lines per function…
fairlighteth Jun 10, 2025
54e6882
fix: update to latest app-data (#5762)
alfetopito Jun 10, 2025
3fb616c
feat(analytics): enhance UTM handling and analytics readiness checks …
fairlighteth Jun 11, 2025
5ed181d
feat: hide non-prod envs from search engines (#5800)
shoom3301 Jun 11, 2025
1bea824
fix(slippage): cap auto-slippage with 50% (#5807)
shoom3301 Jun 12, 2025
7786c99
fix(trade): fix sellToken comparing for quote fetch skip (#5802)
shoom3301 Jun 12, 2025
6393e2c
fix(limit-orders): display prices in orders table (#5808)
shoom3301 Jun 12, 2025
a1898bf
fix(trade): hide auto-slippage warning when amounts are not set (#5811)
shoom3301 Jun 12, 2025
3fa1eb2
chore: remove unused package (#5804)
limitofzero Jun 12, 2025
dbe9a8a
chore: fix typo
shoom3301 Jun 12, 2025
69864da
chore: update .gitignore to include Claude context files (#5810)
fairlighteth Jun 12, 2025
c1fc67d
chore(ci): upgrade setup-node to v4 (#5788)
eeemmmmmm Jun 12, 2025
90915f2
chore: redeploy dev
shoom3301 Jun 13, 2025
6c4d2f4
fix(token-logo): fix network logo size in mobile (#5809)
shoom3301 Jun 13, 2025
4920bab
Merge branch 'release/2025-06-12' of https://github.com/cowprotocol/c…
shoom3301 Jun 13, 2025
9df63e3
feat: integrate ConnectionStatus component and streamline trade form …
fairlighteth Jun 13, 2025
7547aec
fix(service-worker): disable verbose workbox logging in production (#…
fairlighteth Jun 13, 2025
cb53ccb
fix(service-worker): disable verbose workbox logging in production (#…
fairlighteth Jun 13, 2025
38883ad
fix(trade): reset loading state when confirm wasn't happen (#5818)
shoom3301 Jun 13, 2025
e8d28a5
feat: bump iframe transport version (#5826)
shoom3301 Jun 16, 2025
4f1060b
feat: update widget-lib deps (#5827)
shoom3301 Jun 16, 2025
4137d35
feat: update widget-react deps (#5828)
shoom3301 Jun 16, 2025
a3c86ea
feat: bump widget-react version (#5829)
shoom3301 Jun 16, 2025
00238b9
fix: refetch quote when slippage changed (#5824)
shoom3301 Jun 16, 2025
49f22ad
fix(widget): do not request wallet capabilities for wallet-connect (#…
shoom3301 Jun 16, 2025
2c83e45
feat: add `Avalanche` and `Polygon` native token images to Explorer (…
cowdan Jun 16, 2025
154e374
fix(widget): get slippage value directly from active quote (#5830)
limitofzero Jun 16, 2025
4d54d43
Merge remote-tracking branch 'origin/release/2025-06-12' into develop
alfetopito Jun 16, 2025
cfc6bfe
fix(widget): remove legacy `enable` method (#5822)
shoom3301 Jun 17, 2025
d3a2a23
chore: fix ConnectWalletOptions warning (#5840)
shoom3301 Jun 17, 2025
ec6806c
fix(new-networks): add coingecko and uniswap tokens lists to pol and …
alfetopito Jun 17, 2025
96a7a35
fix: reduce rerenders count and theme recalculation (#5831)
shoom3301 Jun 17, 2025
bc72ebf
ci: rename vite mode prod to production (#5842)
shoom3301 Jun 17, 2025
bd7f54e
Merge remote-tracking branch 'origin/release/2025-06-12' into develop
alfetopito Jun 17, 2025
f49e48d
chore: fix start:cowswap
shoom3301 Jun 18, 2025
80cebd1
fix: make order progress bar UI more stable (#5834)
fairlighteth Jun 18, 2025
bf0e321
fix(explorer): adjust items order in order details (#5846)
shoom3301 Jun 18, 2025
343119d
feat(new-networks): change Avalanche explorer from Snowtrace to Snows…
cowdan Jun 18, 2025
3ab6df2
refactor: streamline OrderProgressBar components (#5847)
fairlighteth Jun 18, 2025
5ad5268
Merge pull request #5812 from cowprotocol/release/2025-06-12
shoom3301 Jun 18, 2025
a07ad8c
chore: release main (#5852)
alfetopito Jun 18, 2025
cf4f65b
Merge branch 'develop' of https://github.com/cowprotocol/cowswap into…
shoom3301 Jun 18, 2025
8c4eee4
Merge pull request #5854 from cowprotocol/main-dev-05-18
shoom3301 Jun 18, 2025
65c1b36
feat(new-newtworks): fixed sort order for chains (#5856)
alfetopito Jun 18, 2025
cd398f0
feat(explorer): display bridging data in order page (#5787)
shoom3301 Jun 19, 2025
2589ed5
fix: bump InputAmountNotSet validation priority (#5851)
shoom3301 Jun 19, 2025
df788a6
fix(bridge): do not display chais when source chain not supported (#5…
shoom3301 Jun 19, 2025
1b9acdc
fix(bridge): distinguish native tokens in diff networks (#5844)
shoom3301 Jun 19, 2025
9992365
fix(bridge): do not crash calculating usd price in unsupported chain …
shoom3301 Jun 19, 2025
6d77019
fix(bridge): enable bridging only in Swap (#5837)
shoom3301 Jun 19, 2025
bed6a81
feat: account shows banner is COW token is unavaillable (#5833)
cowdan Jun 19, 2025
b553228
feat: account shows banner is COW token is unavaillable (#5833)
cowdan Jun 19, 2025
01eb38e
fix(bridge): use explorer link from provider networks (#5865)
shoom3301 Jun 20, 2025
cf836bc
feat(auto-slippage): apply auto slippage for ETH flow (#5836)
limitofzero Jun 20, 2025
5bd3807
feat(auto-slippage): apply auto slippage for ETH flow (#5836)
limitofzero Jun 20, 2025
9d2edec
Merge pull request #5857 from cowprotocol/release/2025-06-18
alfetopito Jun 20, 2025
199e72c
chore: release main (#5872)
alfetopito Jun 20, 2025
b309e70
fix(explorer): empty change to trigger build (#5873)
alfetopito Jun 20, 2025
9984d91
chore: release main (#5874)
alfetopito Jun 20, 2025
0f606ca
fix(progress-bar): combinatory auctions (#5866)
alfetopito Jun 20, 2025
d1a2c42
fix(twap): reduce part size for l2s from 5 to 1 usd (#5867)
alfetopito Jun 20, 2025
aeb51f3
Merge branch 'main' into develop
alfetopito Jun 20, 2025
2791624
fix(bridge): display only supported favorite tokens (#5860)
shoom3301 Jun 23, 2025
14079ec
fix(bridge): display full list of networks (#5869)
shoom3301 Jun 23, 2025
5e2d59a
fix(bridge): display correct destination chain (#5870)
shoom3301 Jun 23, 2025
3649f81
Fix: remove 'new' from cow amm (#5879)
elena-zh Jun 23, 2025
c4f163f
feat(trade): display quote refetch indicator (#5859)
shoom3301 Jun 24, 2025
bf1fada
fix(progress-bar): keep querying order status for 3s (#5871)
alfetopito Jun 25, 2025
9c333cc
fix(explorer): handle limit price is infinite (#5886)
alfetopito Jun 25, 2025
78985ce
fix(slippage): add slippage warning settings for different networks (…
limitofzero Jun 25, 2025
13bd0a9
fix(bridge): fix progress bar background (#5888)
shoom3301 Jun 25, 2025
028840b
fix(bridge): do not estimate gas for hook (#5887)
shoom3301 Jun 26, 2025
d09f73f
feat(bridge): enhance bridge activity components (#5855)
fairlighteth Jun 26, 2025
0692597
feat(bridge): display account proxy (#5881)
shoom3301 Jun 26, 2025
c3d969d
feat: update `cow.fi` `/tokens` page (#5889)
cowdan Jun 26, 2025
5b0d9b0
Merge branch 'upstream-develop' into jean/add-state-diff-to-hook-dapp…
jean-neiverth Jun 26, 2025
fc40661
fix(partner-fee): update fee address (#5896)
alfetopito Jun 27, 2025
0bbed1e
chore: release main (#5897)
alfetopito Jun 27, 2025
195ef8f
Merge pull request #5898 from cowprotocol/main
shoom3301 Jun 27, 2025
3ec3475
Merge branch 'develop' into jean/add-state-diff-to-hook-dapp-lib-context
jean-neiverth Jun 27, 2025
4804cd3
fix: build
jean-neiverth Jun 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
uses: actions/checkout@v3

- name: Set up node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
uses: actions/checkout@v3

- name: Set up node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

- name: Set up node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/vercel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:

- name: Build Project Artifacts
run: >
NX_CONFIGURATION=${{ inputs.env_name == 'prod' && 'production' || inputs.env_name }}
REACT_APP_SENTRY_DSN=${{ secrets.SENTRY_DSN }}
REACT_APP_PINATA_API_KEY=${{ secrets.REACT_APP_PINATA_API_KEY }}
REACT_APP_PINATA_SECRET_API_KEY=${{ secrets.REACT_APP_PINATA_SECRET_API_KEY }}
Expand Down
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ node_modules
*.launch
.settings/
*.sublime-workspace
.cursor/

# IDE - VSCode
.vscode/*
Expand Down Expand Up @@ -57,4 +58,12 @@ out

# Next.js sitemap
apps/cow-fi/public/robots.txt
apps/cow-fi/public/sitemap*
apps/cow-fi/public/sitemap*
apps/cowswap-frontend/public/robots.txt

# Claude context files (local only)
CLAUDE.md
.claude/

# Serena project files
.serena/
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/dist
/coverage
/static-files
.cursor/
54 changes: 27 additions & 27 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
"apps/cowswap-frontend": "1.106.4",
"apps/explorer": "2.46.0",
"libs/permit-utils": "0.6.1",
"libs/widget-lib": "0.19.0",
"libs/widget-react": "0.11.0",
"apps/widget-configurator": "1.13.1",
"libs/analytics": "1.11.1",
"libs/assets": "1.13.0",
"libs/common-const": "1.17.2",
"libs/common-hooks": "1.8.1",
"libs/common-utils": "1.13.2",
"libs/core": "1.7.0",
"libs/ens": "1.3.0",
"libs/events": "1.6.0",
"libs/snackbars": "1.1.1",
"libs/tokens": "1.17.1",
"libs/types": "1.6.0",
"libs/ui": "1.23.1",
"libs/wallet": "1.12.0",
"apps/cow-fi": "1.22.2",
"libs/wallet-provider": "1.0.0",
"libs/ui-utils": "1.1.0",
"libs/abis": "1.2.1",
"libs/balances-and-allowances": "1.3.3",
"libs/iframe-transport": "1.0.1",
"libs/hook-dapp-lib": "1.7.0",
"libs/multicall": "1.1.1"
"apps/cowswap-frontend": "1.110.1",
"apps/explorer": "2.48.1",
"libs/permit-utils": "0.6.2",
"libs/widget-lib": "0.19.2",
"libs/widget-react": "0.11.2",
"apps/widget-configurator": "1.14.1",
"libs/analytics": "1.12.0",
"libs/assets": "1.14.0",
"libs/common-const": "1.20.1",
"libs/common-hooks": "1.9.0",
"libs/common-utils": "1.17.0",
"libs/core": "1.7.3",
"libs/ens": "1.4.0",
"libs/events": "1.6.1",
"libs/snackbars": "1.1.3",
"libs/tokens": "1.21.0",
"libs/types": "1.7.1",
"libs/ui": "1.24.0",
"libs/wallet": "1.12.4",
"apps/cow-fi": "1.23.0",
"libs/wallet-provider": "1.0.1",
"libs/ui-utils": "1.1.1",
"libs/abis": "1.2.2",
"libs/balances-and-allowances": "1.4.0",
"libs/iframe-transport": "1.0.3",
"libs/hook-dapp-lib": "1.7.1",
"libs/multicall": "1.1.2"
}
206 changes: 185 additions & 21 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,210 @@
# Development
# CoW Protocol Front-End • Contribution Guide

## Install Dependencies
Welcome! This document is the canonical set of rules every contributor **and every code assistant** must obey.
Make sure you follow them for a speedy review.

---

## 1. Development Quick-Start

### Install dependencies

```bash
yarn install
```

## Generate locale files
### Generate locale files

```
```bash
yarn i18n
```

## Run the interface
### Run the interface

```bash
yarn start
```

# Contributing
---

## 2. Finding a First Issue

Start with issues labeled **Help Wanted**.

---

## 3. Pull Requests

| Rule | Requirement |
| -------------- | ---------------------------------------------------------------------------------- |
| Target branch | Open all PRs against develop |
| PR size | ≤ ≈400 LOC; chain "waterfall" PRs for larger work |
| Commit style | Conventional Commits; PR title == squash message |
| Approvals | Two reviewers (frontend, qa) required |
| Ownership | Author assigns themselves, tags reviewers, keeps ≤ 3 open PRs, closes stale drafts |
| CI | All checks must pass before review |
| Merge Strategy | Squash-merge to develop |

### Additional PR Guidelines

- Start from an issue from the sprint and link it in the PR when possible
- Every feature should go in a separate branch and pushed on its own PR
- If there are 2 approvals but some reviewer has pending comments, address them first before merging
- If your PR is already big and has no major blockers, it's ok to merge the features as they are and address the points raised in a follow up PR
- Keep PRs short when possible - you want reviewers to understand what you are trying to do
- For big features, break into smaller chunks and do "waterfall PRs" (pointing the second PR to the first PR's branch, and so on)
- Include a detailed description of what your PR is about in the summary
- Use screenshots when relevant
- Always include testing steps to your PR
- Make sure your PR builds successfully and keep it up to date with the source branch

---

## 4. Repository Architecture

**Monorepo Structure Principles:**

- `apps/` - Individual applications (cowswap-frontend, cow-fi, explorer, widget-configurator, etc.)
- `libs/` - Shared logic and utilities across applications
- `tools/` - Build and development utilities
- `testing/` - Integration test helpers

**Within cowswap-frontend:**

- `common/` - Shared utilities and components (MUST NOT depend on `modules/`)
- `modules/` - Feature-specific code organized by domain
- `pages/` - React Router page components
- `api/` - Service layer and API wrappers
- `types/` - Shared TypeScript type definitions

**Critical Architectural Rule:** The `common/` directory is leaf-only and MUST NOT depend on `modules/`. This ensures clean dependency flow and prevents circular dependencies.

---

## 5. Code Quality Rules

### TypeScript

- `strictNullChecks`, explicit types everywhere
- **TYPE EVERYTHING!!!** We prefer to add type definitions for most things in TypeScript
- Never use `any`; if unavoidable use `unknown` and add `// TODO` - `any` is bad and the linter will usually complain
- Prefer optional-chaining (`obj?.field`) over `&&` ladders (e.g. use `order?.bridgeDetails` instead of `order && order.bridgeDetails`)
- Encode variant data as `enum + Record<Enum, T>` so the compiler enforces exhaustiveness - TypeScript will error if you omit an enum key
- Explicit function return types required (`@typescript-eslint/explicit-function-return-type`)

### React

- Do not declare components inside another component's render
- Favour composition and named function components
- Use `const` only when a type annotation is needed
- Split large components into pure sub-components under `modules/<feature>/pure/`
- Prefer composition over configuration: split large components into smaller pure subcomponents (e.g. `pure/contents/*`) and compose them instead of adding config props

Thank you for your interest in contributing to the CoW Swap interface! 🐮
### General Code Quality

## Finding a first issue
- Shorter functions are better than longer functions
- Abide by the structure of the respective projects
- Use Storybook when coding UI in a project that uses Storybook, Cosmos where Cosmos is used
- Code should be auto-formatted with rules defined in the project (ESLint)
- You are free to use whatever editor you fancy (VSCode, Intellij, vim, emacs), preferably with format on save (Prettier plugin)

Start with issues with the label
[`Help wanted`](https://github.com/cowprotocol/cowswap/issues?q=is%3Aopen+is%3Aissue+label%3A%22Help_Wanted%22+).
**Keep functions small & prevent unnecessary re-renders.**

## Pull requests
---

**Please open all pull requests against the `develop` branch.**
CI checks will run against all PRs.
## 6. Performance & Memoisation (React 19)

<!-- # Translations
TODO: read and re-enable
Help CoW Swap reach a global audience!
| When to memoise | When not to memoise |
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| `useMemo` for heavyweight calculations rerunning on every render | Skip for trivial expressions or seldom-run code |
| `useCallback` only when ref-equality matters (deps of useEffect, props of React.memo) | Don't wrap every callback "just in case" |
| Wrap largely-static presentational components with React.memo | Avoid memo layers in deep hot trees where the comparison cost outweighs savings |

CoW Swap uses [Crowdin](https://crowdin.com/project/cowswap)
for managing translations. Whenever a new string is added to the project,
it gets uploaded to Crowdin for translation by [this workflow](./.github/workflows/crowdin.yaml).
Additional Guidelines:

You can contribute by joining Crowdin to proofread existing translations [here](https://crowdin.com/project/uniswap-interface/invite?d=93i5n413q403t4g473p443o4c3t2g3s21343u2c3n403l4b3v2735353i4g4k4l4g453j4g4o4j4e4k4b323l4a3h463s4g453q443m4e3t2b303s2a35353l403o443v293e303k4g4n4r4g483i4g4r4j4e4o473i5n4a3t463t4o4)
- Measure with DevTools/performance APIs before adding memoization
- Avoid memoizing inline objects/arrays used infrequently
- Don't preemptively memoize every value or callback—memo itself costs CPU & memory
- Skip memoization in deeply nested render paths where overhead outweighs benefit
- Avoid mixing memoization with dynamic patterns the React Compiler may optimize in the future

Or, ask to join us as a translator in the Discord!
⚠️ **Antipattern**: Creating a child component inside a parent's render — causes remount, state reset, effect re-fire, focus loss. Always declare subcomponents outside or extract them.

---

## 7. Styling & Formatting

- ESLint + Prettier must pass; camelCase everywhere
- Import order:
1. Core (react, jotai…)
2. External (@cowprotocol/_, @uniswap/_, …)
3. Internal absolute aliases (api/, common/, …)
4. Relative paths
- Forbidden imports:
- `@ethersproject/*` (use shared wrapper)
- `styled-components` (use the macro variant)
- `dist/` file paths
- react-router's `useNavigate` (use common/hooks/useNavigate)

---

## 8. Testing

- Unit tests / integration tests required when applicable
- Jest unit tests for logic
- Storybook stories/Cosmos + interaction tests for every UI component
- Include integration tests
- Full CI must be green before review
- Make sure to TEST YOUR OWN PRs before requesting a review

---

## 9. Interaction Contract

1. Ask clarifying questions when requirements are ambiguous
2. Output only ready-to-paste code, using repo-root-relative paths
3. Keep changes minimal; avoid introducing extra re-renders
4. Preserve existing patterns and coding standards
5. Focus on single-responsibility changes

---

## 10. Development Communication

- Use descriptive commit messages, inline comments, and rich PR descriptions (expected behaviour & QA scope)
- Plan work up-front to keep each PR scoped to a single feature/fix

- Provide clear context about feature behavior and QA scope
- If you are stuck on anything, don't hesitate to reach out

---

---

<!--
## Translations
TODO: Re-enable when Crowdin flow is restored.
Help CoW Protocol reach a global audience! See Crowdin workflow in `.github/workflows/crowdin.yaml`.
-->

Thank you for helping keep CoW Protocol fast, stable, and enjoyable to hack on!

**Tip:** If you use Cursor or a similar assistant, set up proper rule files using the modern `.cursor/rules/` directory structure:

Create `.cursor/rules/frontend-guidelines.mdc`:

```markdown
---
description: CoW Protocol frontend development guidelines
globs: ['apps/**', 'libs/**']
alwaysApply: true
---

# CoW Protocol Frontend Guidelines

Follow ALL rules defined in CONTRIBUTING.md exactly.

@CONTRIBUTING.md
```

This ensures both human contributors and AI assistants adhere to consistent coding standards in this repository.
Loading
Loading