Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions apps/cowswap-frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
<script src="/emergency.js"></script>

<!-- Manifest, theme & colors -->
<link rel="apple-touch-icon" sizes="180x180" href="./public/Chameleon-2.png" />
<link rel="icon" type="image/png" href="./public/Chameleon-2.png" media="(prefers-color-scheme: light)" />
<link rel="icon" type="image/png" href="./public/Chameleon-2.png" media="(prefers-color-scheme: dark)" />
<link rel="icon" type="image/png" href="./public/Chameleon-2.png" media="(prefers-color-scheme: no-preference)" />
<link rel="apple-touch-icon" sizes="180x180" href="/Chameleon-2.png" />
<link rel="icon" type="image/png" href="/Chameleon-2.png" media="(prefers-color-scheme: light)" />
<link rel="icon" type="image/png" href="/Chameleon-2.png" media="(prefers-color-scheme: dark)" />
<link rel="icon" type="image/png" href="/Chameleon-2.png" media="(prefers-color-scheme: no-preference)" />

<link rel="manifest" href="/manifest.json" />
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#000000" />
Expand Down
2 changes: 1 addition & 1 deletion apps/cowswap-frontend/src/common/hooks/useCowShedHooks.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CowShedHooks } from '@cowprotocol/cow-sdk'
import { CowShedHooks } from '@cowprotocol/sdk-cow-shed'
import { useWalletInfo } from '@cowprotocol/wallet'

import useSWR from 'swr'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function NetworksList(props: NetworksListProps) {
)}

<ExternalLink href={getExplorerBaseUrl(targetChainId)}>
<Trans>CoW Protocol Explorer</Trans>
<Trans>Chameleon Protocol Explorer</Trans>
<styledEl.LinkOutCircle />
</ExternalLink>
</styledEl.ActiveRowLinkList>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useCallback, useMemo, useState } from 'react'

import { CowShedContract, CowShedContractAbi } from '@cowprotocol/abis'
import { SigningScheme } from '@cowprotocol/contracts'
import { COW_SHED_FACTORY, ICoWShedCall } from '@cowprotocol/cow-sdk'
import { COW_SHED_FACTORY, ICoWShedCall } from '@cowprotocol/sdk-cow-shed'
import { useWalletInfo } from '@cowprotocol/wallet'
import { useWalletProvider } from '@cowprotocol/wallet-provider'
import { defaultAbiCoder } from '@ethersproject/abi'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useSetAtom } from 'jotai'
import { useMemo, useRef } from 'react'
import { useEffect, useRef } from 'react'

import { useLocation, useParams } from 'react-router-dom'

Expand Down Expand Up @@ -28,7 +28,7 @@ export function useSetupTradeStateFromUrl(): null {
* In order to update tradeStateFromUrlAtom faster we use useMemo() here.
* We need this, because useSetupTradeState() depends on the atom value and needs it to be udpated ASAP.
*/
useMemo(() => {
useEffect(() => {
const searchParams = new URLSearchParams(location.search)
const recipient = searchParams.get('recipient')
const recipientAddress = searchParams.get('recipientAddress')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,16 @@ export function useNavigateOnCurrencySelection(): CurrencySelectionCallback {

const { inputCurrencyId, outputCurrencyId } = state
const tokenSymbolOrAddress = resolveCurrencyAddressOrSymbol(currency)
const currentChainId = state.chainId || chainId
const targetChainId = currency?.chainId || currentChainId
const isDifferentChain = currentChainId && targetChainId && currentChainId !== targetChainId

const targetInputCurrencyId = field === Field.INPUT ? tokenSymbolOrAddress : inputCurrencyId
const targetOutputCurrencyId = field === Field.INPUT ? outputCurrencyId : tokenSymbolOrAddress
const targetInputCurrencyId = field === Field.INPUT ? tokenSymbolOrAddress : isDifferentChain ? null : inputCurrencyId
const targetOutputCurrencyId = field === Field.INPUT ? isDifferentChain ? null : outputCurrencyId : tokenSymbolOrAddress
const areCurrenciesTheSame = targetInputCurrencyId === targetOutputCurrencyId

navigate(
chainId,
targetChainId,
// Just invert tokens when user selected the same token
areCurrenciesTheSame
? { inputCurrencyId: outputCurrencyId, outputCurrencyId: inputCurrencyId }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const defaultSlippageAtom = atom((get) => {
const { chainId } = get(walletInfoAtom)
const isEoaEthFlow = get(isEoaEthFlowAtom)

return isEoaEthFlow ? MINIMUM_ETH_FLOW_SLIPPAGE_BPS[chainId] : DEFAULT_SLIPPAGE_BPS
return isEoaEthFlow ? (MINIMUM_ETH_FLOW_SLIPPAGE_BPS[chainId] ?? DEFAULT_SLIPPAGE_BPS) : DEFAULT_SLIPPAGE_BPS
})

const currentSlippageAtom = atom<number | null>((get) => {
Expand Down
4 changes: 4 additions & 0 deletions libs/assets/src/images/logo-avalanche.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions libs/assets/src/images/logo-bnb.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions libs/assets/src/images/logo-linea.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions libs/assets/src/images/logo-plasma.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions libs/assets/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export { default as ArbitrumLogo } from './cow-swap/network-arbitrum-one-logo-blue.svg'
export { default as BaseLogo } from './cow-swap/network-base-logo.svg'
export { default as GnosisLogo } from './cow-swap/network-gnosis-chain-logo.svg'
export { default as MainnetLogo } from './cow-swap/network-mainnet-logo.svg'
export { default as SepoliaLogo } from './cow-swap/network-sepolia-logo.svg'
export { default as PolygonLogo } from './images/logo-polygon.svg'
export { default as LensLogo } from './images/icon-cow-lens.svg'
export { default as AvalancheLogo } from './images/logo-avalanche.svg'
export { default as LineaLogo } from './images/logo-linea.svg'
export { default as BnbLogo } from './images/logo-bnb.svg'
export { default as PlasmaLogo } from './images/logo-plasma.svg'

Loading
Loading