Skip to content

Commit 8b77893

Browse files
committed
Merge remote-tracking branch 'origin/develop' into feat/cross-token-selector
2 parents a1d5dbe + bec1e54 commit 8b77893

File tree

543 files changed

+25151
-3903
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

543 files changed

+25151
-3903
lines changed

.release-please-manifest.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
{
2-
"apps/cowswap-frontend": "1.122.0",
3-
"apps/explorer": "2.57.0",
2+
"apps/cowswap-frontend": "1.123.1",
3+
"apps/explorer": "2.58.0",
44
"libs/permit-utils": "1.0.0",
55
"libs/widget-lib": "0.20.0",
66
"libs/widget-react": "0.11.2",
77
"apps/widget-configurator": "1.16.1",
88
"libs/analytics": "1.13.0",
99
"libs/assets": "1.17.0",
10-
"libs/common-const": "1.28.1",
11-
"libs/common-hooks": "1.11.1",
12-
"libs/common-utils": "1.22.2",
13-
"libs/core": "1.8.1",
14-
"libs/ens": "1.5.0",
10+
"libs/common-const": "1.29.0",
11+
"libs/common-hooks": "1.12.0",
12+
"libs/common-utils": "1.23.0",
13+
"libs/core": "1.9.0",
14+
"libs/ens": "1.6.0",
1515
"libs/events": "2.0.0",
1616
"libs/snackbars": "1.2.0",
17-
"libs/tokens": "1.28.0",
17+
"libs/tokens": "1.29.0",
1818
"libs/types": "2.0.1",
1919
"libs/ui": "1.29.0",
20-
"libs/wallet": "1.15.2",
21-
"apps/cow-fi": "1.27.0",
20+
"libs/wallet": "1.16.0",
21+
"apps/cow-fi": "1.28.0",
2222
"libs/wallet-provider": "1.0.1",
2323
"libs/ui-utils": "1.1.1",
2424
"libs/abis": "1.2.3",
25-
"libs/balances-and-allowances": "1.9.0",
25+
"libs/balances-and-allowances": "1.10.0",
2626
"libs/iframe-transport": "1.1.0",
2727
"libs/hook-dapp-lib": "1.13.0",
2828
"libs/multicall": "1.2.3"

apps/cow-fi/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## [1.28.0](https://github.com/cowprotocol/cowswap/compare/cow-fi-v1.27.0...cow-fi-v1.28.0) (2025-11-10)
4+
5+
6+
### Features
7+
8+
* **new-chains:** add q4 chains ([#6404](https://github.com/cowprotocol/cowswap/issues/6404)) ([ba4edb0](https://github.com/cowprotocol/cowswap/commit/ba4edb0fdc7b4c700dfeae9023da330d74a9faea))
9+
310
## [1.27.0](https://github.com/cowprotocol/cowswap/compare/cow-fi-v1.26.3...cow-fi-v1.27.0) (2025-10-14)
411

512

apps/cow-fi/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cowprotocol/cow-fi",
3-
"version": "1.27.0",
3+
"version": "1.28.0",
44
"description": "CoW DAO website",
55
"main": "index.js",
66
"author": "",

apps/cowswap-frontend/.env

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,14 @@ INTEGRATION_TESTS_INFURA_KEY=
133133
# Path regex (to detect environment)
134134
# REACT_APP_PATH_REGEX_ENS="/ipfs"
135135

136-
137136
# CMS base URL
138137
# REACT_APP_CMS_BASE_URL=http://localhost:1337/api
139138

140139
# Notifications Telegram bot ID
141140
# REACT_APP_TG_BOT_ID=3713371337
141+
142+
#######################################
143+
# Internationalization
144+
#######################################
145+
146+
#REACT_APP_LINGUI_INTERNATIONALIZATION=true

apps/cowswap-frontend/.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# See https://help.github.com/ignore-files/ for more about ignoring files.
22

3-
# generated contract types
3+
# generated language types
44
/src/lib/locales/**/*.js
55
/src/lib/locales/**/en-US.po
66
/src/lib/locales/**/pseudo.po
77
/src/locales/**/*.js
88
/src/locales/**/*.ts
99
/src/locales/**/*.json
10-
/src/locales/**/en-US.po
1110
/src/locales/**/pseudo.po
1211

1312
# dependencies

apps/cowswap-frontend/CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# Changelog
22

3+
## [1.123.1](https://github.com/cowprotocol/cowswap/compare/cowswap-v1.123.0...cowswap-v1.123.1) (2025-11-12)
4+
5+
6+
### Bug Fixes
7+
8+
* add useMemo to prevent rerender loop ([#6504](https://github.com/cowprotocol/cowswap/issues/6504)) ([#6513](https://github.com/cowprotocol/cowswap/issues/6513)) ([8e0cd6d](https://github.com/cowprotocol/cowswap/commit/8e0cd6d41eafcd1c619bed7587eafa8b05d439ec))
9+
10+
## [1.123.0](https://github.com/cowprotocol/cowswap/compare/cowswap-v1.122.0...cowswap-v1.123.0) (2025-11-10)
11+
12+
13+
### Features
14+
15+
* **limit-orders:** check permit validity in orders table ([#6496](https://github.com/cowprotocol/cowswap/issues/6496)) ([0390370](https://github.com/cowprotocol/cowswap/commit/03903702f5fddee093cccde9785d2c49c65aff95))
16+
* **new-chains:** add q4 chains ([#6404](https://github.com/cowprotocol/cowswap/issues/6404)) ([ba4edb0](https://github.com/cowprotocol/cowswap/commit/ba4edb0fdc7b4c700dfeae9023da330d74a9faea))
17+
18+
19+
### Bug Fixes
20+
21+
* hide affected order section user disable partial approve ([#6479](https://github.com/cowprotocol/cowswap/issues/6479)) ([1385188](https://github.com/cowprotocol/cowswap/commit/13851882e8446bb1c822052ccc64c08c52f77b1a))
22+
* **trade:** compare tx approve amount with min amount to swap ([#6501](https://github.com/cowprotocol/cowswap/issues/6501)) ([6f649ec](https://github.com/cowprotocol/cowswap/commit/6f649ec3a2562b3a65aa8c338041ef34fbe9e8ad))
23+
324
## [1.122.0](https://github.com/cowprotocol/cowswap/compare/cowswap-v1.121.5...cowswap-v1.122.0) (2025-11-05)
425

526

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { FC, ReactNode } from 'react'
2+
3+
import { DEFAULT_LOCALE } from '@cowprotocol/common-const'
4+
5+
import { i18n } from '@lingui/core'
6+
import { I18nProvider } from '@lingui/react'
7+
8+
interface ProviderProps {
9+
children: ReactNode
10+
}
11+
12+
i18n.load(DEFAULT_LOCALE, {})
13+
i18n.activate(DEFAULT_LOCALE)
14+
15+
export const LinguiWrapper: FC<ProviderProps> = ({ children }) => {
16+
return <I18nProvider i18n={i18n}>{children}</I18nProvider>
17+
}

apps/cowswap-frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cowprotocol/cowswap",
3-
"version": "1.122.0",
3+
"version": "1.123.1",
44
"description": "CoW Swap",
55
"main": "index.js",
66
"author": "",

apps/cowswap-frontend/src/api/cowProtocol/errors/OperatorError.ts

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { t } from '@lingui/core/macro'
2+
13
type ApiActionType = 'get' | 'create' | 'delete'
24

35
export interface ApiErrorObject {
@@ -108,7 +110,7 @@ function _mapActionToErrorDetail(action?: ApiActionType) {
108110
console.error(
109111
'[OperatorError::_mapActionToErrorDetails] Uncaught error mapping error action type to server error. Please try again later.',
110112
)
111-
return 'Something failed. Please try again later.'
113+
return `Something failed. Please try again later.`
112114
}
113115
}
114116

@@ -144,23 +146,33 @@ export default class OperatorError extends Error {
144146
case 404:
145147
return this.getErrorMessage(errorObject, action)
146148

147-
case 403:
148-
return `The order cannot be ${action === 'create' ? 'accepted' : 'cancelled'}. Your account is deny-listed.`
149+
case 403: {
150+
const acceptedText = t`accepted`
151+
const cancelledText = t`cancelled`
152+
const statusText = action === 'create' ? acceptedText : cancelledText
153+
return t`The order cannot be ${statusText}. Your account is deny-listed.`
154+
}
149155

150-
case 429:
151-
return `The order cannot be ${
152-
action === 'create' ? 'accepted. Too many order placements' : 'cancelled. Too many order cancellations'
153-
}. Please, retry in a minute`
156+
case 429: {
157+
const placementsText = t`accepted. Too many order placements`
158+
const cancellationsText = t`cancelled. Too many order cancellations`
159+
const msg = action === 'create' ? placementsText : cancellationsText
160+
return t`The order cannot be ${msg}. Please, retry in a minute`
161+
}
154162

155163
case 500:
156-
default:
164+
default: {
157165
console.error(
158166
`[OperatorError::getErrorFromStatusCode] Error ${
159167
action === 'create' ? 'creating' : 'cancelling'
160168
} the order, status code:`,
161169
statusCode || 'unknown',
162170
)
163-
return `Error ${action === 'create' ? 'creating' : 'cancelling'} the order`
171+
const creatingText = t`creating`
172+
const cancellingText = t`cancelling`
173+
const verb = action === 'create' ? creatingText : cancellingText
174+
return t`Error ${verb} the order`
175+
}
164176
}
165177
}
166178
constructor(apiError: ApiErrorObject) {

apps/cowswap-frontend/src/common/constants/routes.ts

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import EXPERIMENT_ICON from '@cowprotocol/assets/cow-swap/experiment.svg'
22
import { isInjectedWidget } from '@cowprotocol/common-utils'
33
import { BadgeTypes } from '@cowprotocol/ui'
44

5+
import { MessageDescriptor } from '@lingui/core'
6+
import { msg } from '@lingui/core/macro'
7+
58
export const TRADE_WIDGET_PREFIX = isInjectedWidget() ? '/widget' : ''
69

710
export const Routes = {
@@ -54,25 +57,45 @@ export interface IMenuItem {
5457
badgeType?: (typeof BadgeTypes)[keyof typeof BadgeTypes]
5558
}
5659

57-
export const MENU_ITEMS: IMenuItem[] = [
58-
{ route: Routes.SWAP, label: 'Swap', description: 'Trade tokens' },
59-
{ route: Routes.LIMIT_ORDER, label: 'Limit', fullLabel: 'Limit order', description: 'Set your own price' },
60-
{ route: Routes.ADVANCED_ORDERS, label: 'TWAP', description: 'Place orders with a time-weighted average price' },
60+
export interface I18nIMenuItem extends Omit<IMenuItem, 'label' | 'fullLabel' | 'description' | 'badge'> {
61+
label: MessageDescriptor
62+
fullLabel?: MessageDescriptor
63+
description: MessageDescriptor
64+
badge?: MessageDescriptor
65+
}
66+
67+
export const MENU_ITEMS: I18nIMenuItem[] = [
68+
{
69+
route: Routes.SWAP,
70+
label: msg`Swap`,
71+
description: msg`Trade tokens`,
72+
},
73+
{
74+
route: Routes.LIMIT_ORDER,
75+
label: msg`Limit`,
76+
fullLabel: msg`Limit order`,
77+
description: msg`Set your own price`,
78+
},
79+
{
80+
route: Routes.ADVANCED_ORDERS,
81+
label: msg`TWAP`,
82+
description: msg`Place orders with a time-weighted average price`,
83+
},
6184
]
6285

63-
export const HOOKS_STORE_MENU_ITEM: IMenuItem = {
86+
export const HOOKS_STORE_MENU_ITEM: I18nIMenuItem = {
6487
route: Routes.HOOKS,
65-
label: 'Hooks',
66-
description: 'Powerful tool to generate pre/post interaction for CoW Protocol',
88+
label: msg`Hooks`,
89+
description: msg`Powerful tool to generate pre/post interaction for CoW Protocol`,
6790
badgeImage: EXPERIMENT_ICON,
6891
badgeType: BadgeTypes.INFORMATION,
6992
}
7093

71-
export const YIELD_MENU_ITEM: IMenuItem = {
94+
export const YIELD_MENU_ITEM: I18nIMenuItem = {
7295
route: Routes.YIELD,
73-
label: 'Yield',
74-
fullLabel: 'Yield',
75-
description: 'Provide liquidity',
76-
badge: 'New',
96+
label: msg`Yield`,
97+
fullLabel: msg`Yield`,
98+
description: msg`Provide liquidity`,
99+
badge: msg`New`,
77100
badgeType: BadgeTypes.ALERT,
78101
}

0 commit comments

Comments
 (0)