Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
alfetopito committed Jan 9, 2025
2 parents d111e1f + 8eb858d commit 861c657
Show file tree
Hide file tree
Showing 21 changed files with 143 additions and 19 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.95.3",
"apps/explorer": "2.41.0",
"libs/permit-utils": "0.5.0",
"apps/cowswap-frontend": "1.96.1",
"apps/explorer": "2.42.0",
"libs/permit-utils": "0.6.0",
"libs/widget-lib": "0.18.0",
"libs/widget-react": "0.11.0",
"apps/widget-configurator": "1.10.1",
"apps/widget-configurator": "1.11.0",
"libs/analytics": "1.9.0",
"libs/assets": "1.12.0",
"libs/common-const": "1.13.0",
"libs/common-hooks": "1.6.0",
"libs/common-hooks": "1.6.1",
"libs/common-utils": "1.8.0",
"libs/core": "1.6.0",
"libs/ens": "1.3.0",
"libs/events": "1.5.0",
"libs/snackbars": "1.1.1",
"libs/tokens": "1.13.1",
"libs/tokens": "1.14.0",
"libs/types": "1.5.0",
"libs/ui": "1.17.1",
"libs/wallet": "1.8.1",
"libs/ui": "1.18.0",
"libs/wallet": "1.9.0",
"apps/cow-fi": "1.19.3",
"libs/wallet-provider": "1.0.0",
"libs/ui-utils": "1.1.0",
"libs/abis": "1.2.1",
"libs/balances-and-allowances": "1.2.0",
"libs/iframe-transport": "1.0.0",
"libs/hook-dapp-lib": "1.4.0",
"libs/hook-dapp-lib": "1.5.0",
"libs/multicall": "1.0.0"
}
15 changes: 15 additions & 0 deletions apps/cowswap-frontend/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## [1.96.1](https://github.com/cowprotocol/cowswap/compare/cowswap-v1.96.0...cowswap-v1.96.1) (2025-01-09)


### Bug Fixes

* **token-lists:** remove old token lists from cache ([#5275](https://github.com/cowprotocol/cowswap/issues/5275)) ([1ca7211](https://github.com/cowprotocol/cowswap/commit/1ca7211729c552c1c834b12c2d343ce981b02cf1))

## [1.96.0](https://github.com/cowprotocol/cowswap/compare/cowswap-v1.95.3...cowswap-v1.96.0) (2025-01-09)


### Features

* executedSurplusFee removal ([#5262](https://github.com/cowprotocol/cowswap/issues/5262)) ([3be8a65](https://github.com/cowprotocol/cowswap/commit/3be8a65309048d4082f2ce25f5b39624e092dbf2))
* **swap:** partial approve ([#5256](https://github.com/cowprotocol/cowswap/issues/5256)) ([f080ffd](https://github.com/cowprotocol/cowswap/commit/f080ffdb098612e729f3a3f829410ce78697979f))

## [1.95.3](https://github.com/cowprotocol/cowswap/compare/cowswap-v1.95.2...cowswap-v1.95.3) (2024-12-23)


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.95.3",
"version": "1.96.1",
"description": "CoW Swap",
"main": "index.js",
"author": "",
Expand Down
45 changes: 45 additions & 0 deletions apps/cowswap-frontend/public/emergency.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,51 @@ if (window.location.pathname !== '/') {
window.location.pathname = '/'
}

/**
* Removes deprecated token lists for a particular localStorage key: `allTokenListsInfoAtom:v5`
*
* A change introduced new token lists and removed old ones.
* This code removes the old token lists from the local storage to avoid duplication without resetting user added token lists.
*/
;(function () {
const key = 'allTokenListsInfoAtom:v5'
const storageValue = localStorage.getItem(key)

// Exit early if the storage value is not set
if (!storageValue) return

const tokenLists = JSON.parse(storageValue)

const listsToSkip = new RegExp(
'CoingeckoTokensList\\.json$|' +
'UniswapTokensList\\.json$|' +
'CoinGecko\\.json$|' +
'compound\\.tokenlist\\.json$|' +
'set\\.tokenlist\\.json$|' +
'tokensoft\\.eth$|' +
'opyn-squeeth|' +
'tryroll\\.com|' +
'snx\\.eth$|' +
'aave\\.eth$|' +
'cmc\\.eth$',
)

const updatedTokenLists = Object.keys(tokenLists).reduce((acc, chainId) => {
acc[chainId] = Object.keys(tokenLists[chainId]).reduce((_acc, listPath) => {
if (!listsToSkip.test(listPath)) {
_acc[listPath] = tokenLists[chainId][listPath]
} else {
console.log('[Service worker] Skip token list', listPath)
}
return _acc
}, {})

return acc
}, {})

localStorage.setItem(key, JSON.stringify(updatedTokenLists))
})()

/**
* Remove old versions of the local storage atom stores
* We rely on the fact that store names are in the format {name}Atom:v{version}
Expand Down
10 changes: 9 additions & 1 deletion apps/cowswap-frontend/src/common/pure/NetworksList/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { getChainInfo } from '@cowprotocol/common-const'
import { getExplorerBaseUrl } from '@cowprotocol/common-utils'
import { SupportedChainId } from '@cowprotocol/cow-sdk'
import { ExternalLink } from '@cowprotocol/ui'
import { Badge, BadgeTypes, ExternalLink } from '@cowprotocol/ui'

import { Trans } from '@lingui/macro'

import * as styledEl from './styled'

const NEW_NETWORK_ID = 8453

export interface NetworksListProps {
currentChainId: SupportedChainId | null
isDarkMode: boolean
Expand All @@ -25,11 +27,17 @@ export function NetworksList(props: NetworksListProps) {

const isActive = targetChainId === currentChainId
const logoUrl = getLogo(isDarkMode, isActive, logo.dark, logo.light)
const isNewNetwork = targetChainId === NEW_NETWORK_ID

const rowContent = (
<styledEl.FlyoutRow key={targetChainId} onClick={() => onSelectChain(targetChainId)} active={isActive}>
<styledEl.Logo src={logoUrl} />
<styledEl.NetworkLabel>{label}</styledEl.NetworkLabel>
{isNewNetwork && (
<Badge type={BadgeTypes.ALERT2} style={isActive ? { marginRight: '10px' } : undefined}>
NEW
</Badge>
)}
{isActive && <styledEl.FlyoutRowActiveIndicator active />}
</styledEl.FlyoutRow>
)
Expand Down
7 changes: 7 additions & 0 deletions apps/explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [2.42.0](https://github.com/cowprotocol/cowswap/compare/explorer-v2.41.0...explorer-v2.42.0) (2025-01-09)


### Features

* executedSurplusFee removal ([#5262](https://github.com/cowprotocol/cowswap/issues/5262)) ([3be8a65](https://github.com/cowprotocol/cowswap/commit/3be8a65309048d4082f2ce25f5b39624e092dbf2))

## [2.41.0](https://github.com/cowprotocol/cowswap/compare/explorer-v2.40.1...explorer-v2.41.0) (2024-12-19)


Expand Down
2 changes: 1 addition & 1 deletion apps/explorer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cowprotocol/explorer",
"version": "2.41.0",
"version": "2.42.0",
"description": "CoW Swap Explorer",
"main": "src/main.tsx",
"author": "",
Expand Down
7 changes: 7 additions & 0 deletions apps/widget-configurator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [1.11.0](https://github.com/cowprotocol/cowswap/compare/widget-configurator-v1.10.1...widget-configurator-v1.11.0) (2025-01-09)


### Features

* **token-lists:** remove outdated token lists ([#5233](https://github.com/cowprotocol/cowswap/issues/5233)) ([6f73dfc](https://github.com/cowprotocol/cowswap/commit/6f73dfc1c604393f4c4a54fe207893b698bba4a8))

## [1.10.1](https://github.com/cowprotocol/cowswap/compare/widget-configurator-v1.10.0...widget-configurator-v1.10.1) (2024-12-18)


Expand Down
2 changes: 1 addition & 1 deletion apps/widget-configurator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cowprotocol/widget-configurator",
"version": "1.10.1",
"version": "1.11.0",
"description": "CoW Swap widget configurator",
"main": "src/main.tsx",
"author": "",
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.1](https://github.com/cowprotocol/cowswap/compare/common-hooks-v1.6.0...common-hooks-v1.6.1) (2025-01-09)


### Bug Fixes

* **feature-flags:** remove isBaseEnabled feature flag ([#5234](https://github.com/cowprotocol/cowswap/issues/5234)) ([1626a04](https://github.com/cowprotocol/cowswap/commit/1626a04e2c0b530c2efae842776ba5af6014a1da))

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


Expand Down
2 changes: 1 addition & 1 deletion libs/common-hooks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cowprotocol/common-hooks",
"version": "1.6.0",
"version": "1.6.1",
"main": "./index.js",
"types": "./index.d.ts",
"exports": {
Expand Down
7 changes: 7 additions & 0 deletions libs/hook-dapp-lib/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [1.5.0](https://github.com/cowprotocol/cowswap/compare/hook-dapp-lib-v1.4.0...hook-dapp-lib-v1.5.0) (2025-01-09)


### Features

* **swap:** partial approve ([#5256](https://github.com/cowprotocol/cowswap/issues/5256)) ([f080ffd](https://github.com/cowprotocol/cowswap/commit/f080ffdb098612e729f3a3f829410ce78697979f))

## [1.4.0](https://github.com/cowprotocol/cowswap/compare/hook-dapp-lib-v1.3.0...hook-dapp-lib-v1.4.0) (2024-12-11)


Expand Down
2 changes: 1 addition & 1 deletion libs/hook-dapp-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cowprotocol/hook-dapp-lib",
"version": "1.4.0",
"version": "1.5.0",
"type": "commonjs",
"description": "CoW Swap Hook Dapp Library. Allows you to develop pre/post hooks dapps for CoW Protocol.",
"main": "index.js",
Expand Down
7 changes: 7 additions & 0 deletions libs/permit-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [0.6.0](https://github.com/cowprotocol/cowswap/compare/permit-utils-v0.5.0...permit-utils-v0.6.0) (2025-01-09)


### Features

* **swap:** partial approve ([#5256](https://github.com/cowprotocol/cowswap/issues/5256)) ([f080ffd](https://github.com/cowprotocol/cowswap/commit/f080ffdb098612e729f3a3f829410ce78697979f))

## [0.5.0](https://github.com/cowprotocol/cowswap/compare/permit-utils-v0.4.0...permit-utils-v0.5.0) (2024-12-03)


Expand Down
2 changes: 1 addition & 1 deletion libs/permit-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cowprotocol/permit-utils",
"version": "0.5.0",
"version": "0.6.0",
"type": "module",
"dependencies": {
"ethers": "^5.7.2",
Expand Down
7 changes: 7 additions & 0 deletions libs/tokens/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [1.14.0](https://github.com/cowprotocol/cowswap/compare/tokens-v1.13.1...tokens-v1.14.0) (2025-01-09)


### Features

* **token-lists:** remove outdated token lists ([#5233](https://github.com/cowprotocol/cowswap/issues/5233)) ([6f73dfc](https://github.com/cowprotocol/cowswap/commit/6f73dfc1c604393f4c4a54fe207893b698bba4a8))

## [1.13.1](https://github.com/cowprotocol/cowswap/compare/tokens-v1.13.0...tokens-v1.13.1) (2024-12-18)


Expand Down
2 changes: 1 addition & 1 deletion libs/tokens/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cowprotocol/tokens",
"version": "1.13.1",
"version": "1.14.0",
"main": "./index.js",
"types": "./index.d.ts",
"exports": {
Expand Down
7 changes: 7 additions & 0 deletions libs/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [1.18.0](https://github.com/cowprotocol/cowswap/compare/ui-v1.17.1...ui-v1.18.0) (2025-01-09)


### Features

* **swap:** partial approve ([#5256](https://github.com/cowprotocol/cowswap/issues/5256)) ([f080ffd](https://github.com/cowprotocol/cowswap/commit/f080ffdb098612e729f3a3f829410ce78697979f))

## [1.17.1](https://github.com/cowprotocol/cowswap/compare/ui-v1.17.0...ui-v1.17.1) (2024-12-23)


Expand Down
2 changes: 1 addition & 1 deletion libs/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cowprotocol/ui",
"version": "1.17.1",
"version": "1.18.0",
"main": "./index.js",
"types": "./index.d.ts",
"exports": {
Expand Down
7 changes: 7 additions & 0 deletions libs/wallet/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/wallet-v1.8.1...wallet-v1.9.0) (2025-01-09)


### Features

* **wallets:** reapply "feat(wallets): add metaMask SDK connector ([#5028](https://github.com/cowprotocol/cowswap/issues/5028))" ([#5215](https://github.com/cowprotocol/cowswap/issues/5215)) ([#5223](https://github.com/cowprotocol/cowswap/issues/5223)) ([28fcda9](https://github.com/cowprotocol/cowswap/commit/28fcda95c7002a528c538917450bc38b67c0a5eb))

## [1.8.1](https://github.com/cowprotocol/cowswap/compare/wallet-v1.8.0...wallet-v1.8.1) (2024-12-19)


Expand Down
2 changes: 1 addition & 1 deletion libs/wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cowprotocol/wallet",
"version": "1.8.1",
"version": "1.9.0",
"main": "./index.js",
"types": "./index.d.ts",
"exports": {
Expand Down

0 comments on commit 861c657

Please sign in to comment.