Skip to content

Commit

Permalink
Merge pull request #5189 from cowprotocol/main
Browse files Browse the repository at this point in the history
Main -> develop
  • Loading branch information
shoom3301 authored Dec 12, 2024
2 parents ed152f7 + aac2c7b commit f36635c
Show file tree
Hide file tree
Showing 34 changed files with 171 additions and 54 deletions.
18 changes: 9 additions & 9 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
"apps/cowswap-frontend": "1.92.2",
"apps/cowswap-frontend": "1.93.1",
"apps/explorer": "2.38.0",
"libs/permit-utils": "0.5.0",
"libs/widget-lib": "0.18.0",
"libs/widget-react": "0.11.0",
"apps/widget-configurator": "1.10.0",
"libs/analytics": "1.8.0",
"libs/analytics": "1.9.0",
"libs/assets": "1.11.0",
"libs/common-const": "1.11.0",
"libs/common-hooks": "1.5.0",
"libs/common-const": "1.12.1",
"libs/common-hooks": "1.6.0",
"libs/common-utils": "1.8.0",
"libs/core": "1.4.0",
"libs/core": "1.5.0",
"libs/ens": "1.3.0",
"libs/events": "1.5.0",
"libs/snackbars": "1.1.0",
"libs/tokens": "1.12.0",
"libs/tokens": "1.13.0",
"libs/types": "1.5.0",
"libs/ui": "1.15.0",
"libs/ui": "1.16.0",
"libs/wallet": "1.7.0",
"apps/cow-fi": "1.18.0",
"apps/cow-fi": "1.19.0",
"libs/wallet-provider": "1.0.0",
"libs/ui-utils": "1.1.0",
"libs/abis": "1.2.0",
"libs/balances-and-allowances": "1.2.0",
"libs/iframe-transport": "1.0.0",
"libs/hook-dapp-lib": "1.3.0",
"libs/hook-dapp-lib": "1.4.0",
"libs/multicall": "1.0.0"
}
12 changes: 12 additions & 0 deletions apps/cow-fi/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## [1.19.0](https://github.com/cowprotocol/cowswap/compare/cow-fi-v1.18.0...cow-fi-v1.19.0) (2024-12-11)


### Features

* **cow-fi:** upgrade project structure to /app ([#5167](https://github.com/cowprotocol/cowswap/issues/5167)) ([ed152f7](https://github.com/cowprotocol/cowswap/commit/ed152f7ac0fa62ab2c0b9c93035a551c3b8cb4b6))


### Bug Fixes

* add Base to CoW Protocol FAQ on cow.fi ([#5179](https://github.com/cowprotocol/cowswap/issues/5179)) ([a38a3e5](https://github.com/cowprotocol/cowswap/commit/a38a3e5b0cb82d3ad1863f980cfa062d3e8d9954))

## [1.18.0](https://github.com/cowprotocol/cowswap/compare/cow-fi-v1.17.0...cow-fi-v1.18.0) (2024-12-09)


Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Metadata } from 'next'
import { getPageMetadata } from '@/util/getPageMetadata'

export const metadata: Metadata = {
export const metadata: Metadata = getPageMetadata({
title: 'All articles',
description: 'All knowledge base articles in the Cow DAO ecosystem',
}
})

export default function LayoutPage({ children }: { children: React.ReactNode }) {
return children
Expand Down
10 changes: 9 additions & 1 deletion apps/cow-fi/app/(learn)/learn/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import { Metadata } from 'next'
import { getPageMetadata } from '@/util/getPageMetadata'
import { CONFIG } from '@/const/meta'

const title = 'Knowledge Base - CoW DAO'

export const metadata: Metadata = {
...getPageMetadata({
title,
description: CONFIG.description,
}),
title: {
default: 'Knowledge Base - CoW DAO',
default: title,
template: '%s - CoW DAO',
},
}
Expand Down
9 changes: 5 additions & 4 deletions apps/cow-fi/app/(learn)/learn/topic/[topicSlug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { getAllCategorySlugs, getArticles, getCategories, getCategoryBySlug } fr
import { TopicPageComponent } from '@/components/TopicPageComponent'
import { notFound } from 'next/navigation'
import type { Metadata } from 'next'
import { getPageMetadata } from '@/util/getPageMetadata'

type Props = {
params: Promise<{ topicSlug: string }>
Expand All @@ -16,12 +17,12 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
if (!topicSlug) return {}

const category = await getCategoryBySlug(topicSlug)
const { name, description } = category?.attributes || {}
const { name, description = '' } = category?.attributes || {}

return {
title: name,
return getPageMetadata({
absoluteTitle: `${name} - Knowledge base`,
description,
}
})
}

export async function generateStaticParams() {
Expand Down
7 changes: 4 additions & 3 deletions apps/cow-fi/app/(learn)/learn/topics/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Metadata } from 'next'
import { getPageMetadata } from '@/util/getPageMetadata'

export const metadata: Metadata = {
title: 'Topics',
export const metadata: Metadata = getPageMetadata({
title: 'Knowledge base topics',
description: 'All knowledge base topics',
}
})

export default function LayoutPage({ children }: { children: React.ReactNode }) {
return children
Expand Down
2 changes: 1 addition & 1 deletion apps/cow-fi/app/(main)/careers/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { getPageMetadata } from '@/util/getPageMetadata'

export const metadata: Metadata = {
...getPageMetadata({
title: 'Careers',
title: 'Careers - CoW DAO',
description:
'We are an ambitious, fast-growing and international team working at the forefront of DeFi. We believe that we can make markets more fair and more efficient by building the ultimate batch auction settlement layer across EVM-compatible blockchains.',
}),
Expand Down
1 change: 0 additions & 1 deletion apps/cow-fi/app/(main)/daos/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Metadata } from 'next'
import { getPageMetadata } from '@/util/getPageMetadata'
import { CONFIG } from '@/const/meta'

export const metadata: Metadata = {
...getPageMetadata({
Expand Down
11 changes: 6 additions & 5 deletions apps/cow-fi/app/(main)/legal/cowswap-cookie-policy/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Metadata } from 'next'
import { getPageMetadata } from '@/util/getPageMetadata'
import { CONFIG } from '@/const/meta'

export const metadata: Metadata = {
title: {
absolute: 'CoW Swap - Cookie policy',
},
}
export const metadata: Metadata = getPageMetadata({
absoluteTitle: 'CoW Swap - Cookie policy',
description: CONFIG.description,
})

export default function LayoutPage({ children }: { children: React.ReactNode }) {
return children
Expand Down
11 changes: 6 additions & 5 deletions apps/cow-fi/app/(main)/legal/cowswap-privacy-policy/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Metadata } from 'next'
import { getPageMetadata } from '@/util/getPageMetadata'
import { CONFIG } from '@/const/meta'

export const metadata: Metadata = {
title: {
absolute: 'CoW Swap - Privacy policy',
},
}
export const metadata: Metadata = getPageMetadata({
absoluteTitle: 'CoW Swap - Privacy policy',
description: CONFIG.description,
})

export default function LayoutPage({ children }: { children: React.ReactNode }) {
return children
Expand Down
9 changes: 6 additions & 3 deletions apps/cow-fi/app/(main)/legal/cowswap-terms/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { Metadata } from 'next'
import { getPageMetadata } from '@/util/getPageMetadata'
import { CONFIG } from '@/const/meta'

export const metadata: Metadata = {
title: { absolute: 'CoW Swap - Terms and Conditions' },
}
export const metadata: Metadata = getPageMetadata({
absoluteTitle: 'CoW Swap - Terms and Conditions',
description: CONFIG.description,
})

export default function LayoutPage({ children }: { children: React.ReactNode }) {
return children
Expand Down
11 changes: 6 additions & 5 deletions apps/cow-fi/app/(main)/legal/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Metadata } from 'next'
import { getPageMetadata } from '@/util/getPageMetadata'
import { CONFIG } from '@/const/meta'

export const metadata: Metadata = {
title: {
absolute: 'Legal - CoW DAO Legal Overview',
},
}
export const metadata: Metadata = getPageMetadata({
absoluteTitle: 'Legal - CoW DAO Legal Overview',
description: CONFIG.description,
})

export default function LayoutPage({ children }: { children: React.ReactNode }) {
return children
Expand Down
9 changes: 6 additions & 3 deletions apps/cow-fi/app/(main)/legal/widget-terms/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { Metadata } from 'next'
import { getPageMetadata } from '@/util/getPageMetadata'
import { CONFIG } from '@/const/meta'

export const metadata: Metadata = {
title: { absolute: 'Widget - Terms and Conditions' },
}
export const metadata: Metadata = getPageMetadata({
absoluteTitle: 'Widget - Terms and Conditions',
description: CONFIG.description,
})

export default function LayoutPage({ children }: { children: React.ReactNode }) {
return children
Expand Down
1 change: 0 additions & 1 deletion apps/cow-fi/app/(main)/tokens/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Metadata } from 'next'
import { getPageMetadata } from '@/util/getPageMetadata'
import { CONFIG } from '@/const/meta'

export const metadata: Metadata = {
...getPageMetadata({
Expand Down
2 changes: 1 addition & 1 deletion apps/cow-fi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cowprotocol/cow-fi",
"version": "1.18.0",
"version": "1.19.0",
"description": "CoW DAO website",
"main": "index.js",
"author": "",
Expand Down
14 changes: 14 additions & 0 deletions apps/cowswap-frontend/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## [1.93.1](https://github.com/cowprotocol/cowswap/compare/cowswap-v1.93.0...cowswap-v1.93.1) (2024-12-12)


### Bug Fixes

* **volume-fee:** control safe app fees for stablecoins with ff ([#5187](https://github.com/cowprotocol/cowswap/issues/5187)) ([e7bc7c5](https://github.com/cowprotocol/cowswap/commit/e7bc7c5df35e233da9af8da950973a4272f10365))

## [1.93.0](https://github.com/cowprotocol/cowswap/compare/cowswap-v1.92.2...cowswap-v1.93.0) (2024-12-11)


### Features

* **cow-fi:** upgrade project structure to /app ([#5167](https://github.com/cowprotocol/cowswap/issues/5167)) ([ed152f7](https://github.com/cowprotocol/cowswap/commit/ed152f7ac0fa62ab2c0b9c93035a551c3b8cb4b6))

## [1.92.2](https://github.com/cowprotocol/cowswap/compare/cowswap-v1.92.1...cowswap-v1.92.2) (2024-12-05)


Expand Down
2 changes: 1 addition & 1 deletion apps/cowswap-frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cowprotocol/cowswap",
"version": "1.92.2",
"version": "1.93.1",
"description": "CoW Swap",
"main": "index.js",
"author": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export async function tradeFlow(
const { account, recipientAddressOrName, sellToken, buyToken, appData, isSafeWallet, inputAmount, outputAmount } =
postOrderParams
const marketLabel = [sellToken.symbol, buyToken.symbol].join(',')

const swapFlowAnalyticsContext: TradeFlowAnalyticsContext = {
account,
recipient: recipientAddressOrName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const FEE_PERCENTAGE_BPS = {
export const safeAppFeeAtom = atom<VolumeFee | null>((get) => {
const { chainId } = get(walletInfoAtom)
const { isSafeApp } = get(walletDetailsAtom)
const { isSafeAppFeeEnabled } = get(featureFlagsAtom)
const { isSafeAppFeeEnabled, isSafeAppStableCoinsFeeEnabled } = get(featureFlagsAtom)
const { inputCurrency, outputCurrency, inputCurrencyFiatAmount, outputCurrencyFiatAmount, orderKind } =
get(derivedTradeStateAtom) || {}

Expand All @@ -54,6 +54,8 @@ export const safeAppFeeAtom = atom<VolumeFee | null>((get) => {
const isOutputStableCoin = !!outputCurrency && stablecoins.has(getCurrencyAddress(outputCurrency).toLowerCase())
const isStableCoinTrade = isInputStableCoin && isOutputStableCoin

if (isStableCoinTrade && !isSafeAppStableCoinsFeeEnabled) return null

const bps = (() => {
if (fiatAmount < FEE_TIERS.TIER_1) {
return isStableCoinTrade ? FEE_PERCENTAGE_BPS.STABLE.TIER_1 : FEE_PERCENTAGE_BPS.REGULAR.TIER_1
Expand Down
7 changes: 7 additions & 0 deletions libs/analytics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [1.9.0](https://github.com/cowprotocol/cowswap/compare/analytics-v1.8.0...analytics-v1.9.0) (2024-12-11)


### Features

* **cow-fi:** upgrade project structure to /app ([#5167](https://github.com/cowprotocol/cowswap/issues/5167)) ([ed152f7](https://github.com/cowprotocol/cowswap/commit/ed152f7ac0fa62ab2c0b9c93035a551c3b8cb4b6))

## [1.8.0](https://github.com/cowprotocol/cowswap/compare/analytics-v1.7.0...analytics-v1.8.0) (2024-09-30)


Expand Down
2 changes: 1 addition & 1 deletion libs/analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cowprotocol/analytics",
"version": "1.8.0",
"version": "1.9.0",
"main": "./index.js",
"types": "./index.d.ts",
"exports": {
Expand Down
14 changes: 14 additions & 0 deletions libs/common-const/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## [1.12.1](https://github.com/cowprotocol/cowswap/compare/common-const-v1.12.0...common-const-v1.12.1) (2024-12-12)


### Bug Fixes

* **volume-fee:** control safe app fees for stablecoins with ff ([#5187](https://github.com/cowprotocol/cowswap/issues/5187)) ([e7bc7c5](https://github.com/cowprotocol/cowswap/commit/e7bc7c5df35e233da9af8da950973a4272f10365))

## [1.12.0](https://github.com/cowprotocol/cowswap/compare/common-const-v1.11.0...common-const-v1.12.0) (2024-12-11)


### Features

* **cow-fi:** upgrade project structure to /app ([#5167](https://github.com/cowprotocol/cowswap/issues/5167)) ([ed152f7](https://github.com/cowprotocol/cowswap/commit/ed152f7ac0fa62ab2c0b9c93035a551c3b8cb4b6))

## [1.11.0](https://github.com/cowprotocol/cowswap/compare/common-const-v1.10.1...common-const-v1.11.0) (2024-12-03)


Expand Down
2 changes: 1 addition & 1 deletion libs/common-const/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cowprotocol/common-const",
"version": "1.11.0",
"version": "1.12.1",
"main": "./index.js",
"types": "./index.d.ts",
"exports": {
Expand Down
16 changes: 15 additions & 1 deletion libs/common-const/src/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,14 @@ export const USDC_SEPOLIA = new TokenWithLogo(
'USDC',
'USDC (test)',
)
export const USDT_SEPOLIA = new TokenWithLogo(
USDT.logoURI,
SupportedChainId.SEPOLIA,
'0x58eb19ef91e8a6327fed391b51ae1887b833cc91',
6,
'USDT',
'Tether USD',
)

export const USDC: Record<SupportedChainId, TokenWithLogo> = {
[SupportedChainId.MAINNET]: USDC_MAINNET,
Expand Down Expand Up @@ -483,16 +491,22 @@ const BASE_STABLECOINS = [
CGUSD_BASE.address,
USD_PLUS_BASE.address,
EUSD_BASE.address,
USDT_BASE.address,
].map((t) => t.toLowerCase())

// Not used for fees
const SEPOLIA_STABLECOINS = [USDC_SEPOLIA.address, USDT_SEPOLIA.address].map((t) => t.toLowerCase())

export const STABLECOINS: Record<ChainId, Set<string>> = {
[SupportedChainId.MAINNET]: new Set(MAINNET_STABLECOINS),
[SupportedChainId.GNOSIS_CHAIN]: new Set(GNOSIS_CHAIN_STABLECOINS),
[SupportedChainId.ARBITRUM_ONE]: new Set(ARBITRUM_ONE_STABLECOINS),
[SupportedChainId.SEPOLIA]: new Set([USDC_SEPOLIA.address]),
[SupportedChainId.SEPOLIA]: new Set(SEPOLIA_STABLECOINS),
[SupportedChainId.BASE]: new Set(BASE_STABLECOINS),
}

console.debug('STABLECOINS', STABLECOINS)

/**
* Addresses related to COW vesting for Locked GNO
* These are used in src/custom/pages/Account/LockedGnoVesting hooks and index files
Expand Down
7 changes: 7 additions & 0 deletions libs/common-hooks/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [1.6.0](https://github.com/cowprotocol/cowswap/compare/common-hooks-v1.5.0...common-hooks-v1.6.0) (2024-12-11)


### Features

* **cow-fi:** upgrade project structure to /app ([#5167](https://github.com/cowprotocol/cowswap/issues/5167)) ([ed152f7](https://github.com/cowprotocol/cowswap/commit/ed152f7ac0fa62ab2c0b9c93035a551c3b8cb4b6))

## [1.5.0](https://github.com/cowprotocol/cowswap/compare/common-hooks-v1.4.0...common-hooks-v1.5.0) (2024-12-03)


Expand Down
Loading

0 comments on commit f36635c

Please sign in to comment.