Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Merge pull request #2609 from gnosis/hotfix/1.12.4
Browse files Browse the repository at this point in the history
[Hotfix] 1.12.4
  • Loading branch information
W3stside authored Mar 29, 2022
2 parents e4b9b32 + 9fde33b commit f1541e8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion craco.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if (SENTRY_AUTH_TOKEN) {
// sentry-cli configuration - can also be done directly through sentry-cli
// see https://docs.sentry.io/product/cli/configuration/ for details
authToken: SENTRY_AUTH_TOKEN,
org: 'gnosis-protocol',
org: 'cowprotocol',
project: 'cowswap',
release: SENTRY_RELEASE_VERSION,

Expand Down
7 changes: 6 additions & 1 deletion src/custom/constants/tokens/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import { SupportedChainId } from 'constants/chains'
import { V_COW_CONTRACT_ADDRESS, COW_CONTRACT_ADDRESS } from 'constants/index'

import wxDaiLogo from 'assets/cow-swap/wxdai.png'
import vCowLogo from 'assets/cow-swap/cow.svg'
// TODO: these are the same? why?
import vCowLogo from 'assets/cow-swap/vCOW.png'
import cowLogo from 'assets/cow-swap/cow.svg'
import gnoLogo from 'assets/cow-swap/gno.png'
import usdcLogo from 'assets/cow-swap/usdc.png'

Expand Down Expand Up @@ -127,6 +129,7 @@ export const ADDRESS_IMAGE_OVERRIDE = {
[WBTC_RINKEBY.address]: getTrustImage(WBTC.address),
[WETH9[ChainId.RINKEBY].address]: getTrustImage(WETH_ADDRESS_MAINNET),
[V_COW_TOKEN_RINKEBY.address]: vCowLogo,
[COW_TOKEN_RINKEBY.address]: cowLogo,
[GNO_RINKEBY.address]: gnoLogo,
[USDC_RINKEBY.address]: usdcLogo,
// xDai
Expand All @@ -136,8 +139,10 @@ export const ADDRESS_IMAGE_OVERRIDE = {
[WXDAI.address]: wxDaiLogo,
[WETH_XDAI.address]: getTrustImage(WETH_ADDRESS_MAINNET),
[V_COW_TOKEN_XDAI.address]: vCowLogo,
[COW_TOKEN_XDAI.address]: cowLogo,
[GNO_XDAI.address]: gnoLogo,
[USDC_XDAI.address]: usdcLogo,
// Mainnet
[V_COW_TOKEN_MAINNET.address]: vCowLogo,
[COW_TOKEN_MAINNET.address]: cowLogo,
}
11 changes: 7 additions & 4 deletions src/custom/state/price/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,15 @@ function quoteUsingSameParameters(currentParams: FeeQuoteParams, quoteInfo: Quot
sellToken: currentSellToken,
buyToken: currentBuyToken,
kind: currentKind,
userAddress: currentUserAddress,
} = currentParams
const { amount, buyToken, sellToken, kind } = quoteInfo

return (
const { amount, buyToken, sellToken, kind, userAddress } = quoteInfo
// cache the base quote params without quoteInfo user address to check
const paramsWithoutAddress =
sellToken === currentSellToken && buyToken === currentBuyToken && amount === currentAmount && kind === currentKind
)
// 2 checks: if there's a quoteInfo user address (meaning quote was already calculated once) and one without
// in case user is not connected
return userAddress ? currentUserAddress === userAddress && paramsWithoutAddress : paramsWithoutAddress
}

/**
Expand Down

0 comments on commit f1541e8

Please sign in to comment.