Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #372 from cowprotocol/hotfix/2.17.1
Browse files Browse the repository at this point in the history
Hotfix 2.17.1
  • Loading branch information
alfetopito committed Feb 28, 2023
2 parents 46d6eff + fea076d commit 037a3ee
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 13 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cowprotocol/explorer",
"version": "2.17.0",
"version": "2.17.1",
"description": "",
"main": "src/index.js",
"sideEffects": false,
Expand Down Expand Up @@ -48,7 +48,7 @@
"@apollo/client": "^3.1.5",
"@cowprotocol/app-data": "0.0.1-RC.5",
"@cowprotocol/contracts": "1.3.1",
"@cowprotocol/cow-sdk": "^1.0.1-RC.8",
"@cowprotocol/cow-sdk": "^1.0.2-RC.7",
"@fortawesome/fontawesome-svg-core": "^6.1.2",
"@fortawesome/free-regular-svg-icons": "^6.1.2",
"@fortawesome/free-solid-svg-icons": "^6.1.2",
Expand Down
27 changes: 25 additions & 2 deletions src/const.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import BigNumber from 'bignumber.js'
import BN from 'bn.js'
import { CowSdk } from '@cowprotocol/cow-sdk'
import { CowSdk, SupportedChainId as ChainId } from '@cowprotocol/cow-sdk'
import { TokenErc20, UNLIMITED_ORDER_AMOUNT, BATCH_TIME } from '@gnosis.pm/dex-js'
export {
UNLIMITED_ORDER_AMOUNT,
Expand Down Expand Up @@ -160,7 +160,30 @@ export const ORDER_BOOK_HOPS_MAX = 30
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1474.md
export const LIMIT_EXCEEDED_ERROR_CODE = -32005

export const COW_SDK = new CowSdk(Network.MAINNET)
function getSubgraphUrls(): Partial<Record<ChainId, string>> {
const subgraphBaseUrls: Partial<Record<ChainId, string>> = {}
const [mainnetUrl, gcUrl, goerliUrl] = [
process.env.REACT_APP_SUBGRAPH_URL_MAINNET || undefined,
process.env.REACT_APP_SUBGRAPH_URL_GNOSIS_CHAIN || undefined,
process.env.REACT_APP_SUBGRAPH_URL_GOERLI || undefined,
]

if (mainnetUrl) {
subgraphBaseUrls[ChainId.MAINNET] = mainnetUrl
}
if (gcUrl) {
subgraphBaseUrls[ChainId.GNOSIS_CHAIN] = gcUrl
}
if (goerliUrl) {
subgraphBaseUrls[ChainId.GOERLI] = goerliUrl
}

return subgraphBaseUrls
}

export const COW_SDK = new CowSdk(Network.MAINNET, {
subgraphBaseUrls: getSubgraphUrls(),
})

export const ETH: TokenErc20 = {
name: 'ETH',
Expand Down
4 changes: 4 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ const EXPLORER_APP = {

GOOGLE_ANALYTICS_ID: undefined,
REACT_APP_SENTRY_DSN: undefined,

REACT_APP_SUBGRAPH_URL_MAINNET: undefined,
REACT_APP_SUBGRAPH_URL_GNOSIS_CHAIN: undefined,
REACT_APP_SUBGRAPH_URL_GOERLI: undefined,
},
}
const ALL_APPS = [EXPLORER_APP]
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1357,10 +1357,10 @@
dependencies:
ajv "^8.11.0"

"@cowprotocol/app-data@^0.0.2-RC.1":
version "0.0.2-RC.1"
resolved "https://registry.yarnpkg.com/@cowprotocol/app-data/-/app-data-0.0.2-RC.1.tgz#66f02f05e120b4b03b265fd609c07089f0db68c9"
integrity sha512-x+fRnQ62u9nF04vkeWoiiU97Ug6kPunn76uZeVF1TyVg7N8TAy97XJL7V5s9PKddbmT5TKECmVqQ0TVeeyCtDA==
"@cowprotocol/app-data@^0.0.3-RC.0":
version "0.0.3-RC.0"
resolved "https://registry.yarnpkg.com/@cowprotocol/app-data/-/app-data-0.0.3-RC.0.tgz#23fc1e19adade3e95243f03e9624f42e6ae165c6"
integrity sha512-N1JpAIK9cTGnmI/Z682GtEN7LJYzc96klqHZMR58mqlsoZVobPpH9x7QDug03hTjE+81N0J7NwdiQ7y3lhKvoQ==
dependencies:
ajv "^8.11.0"

Expand All @@ -1369,12 +1369,12 @@
resolved "https://registry.yarnpkg.com/@cowprotocol/contracts/-/contracts-1.3.1.tgz#a812b27bdd0c046ab730eb24911ef7c641ed0df8"
integrity sha512-p93xODog3XG5eSDU5od1ERvYf7YIyXd7USknKcsWnka5VN5mDDjqjCKTLw8EoZdrCIEpf6fGd8At2nv+MsvNqA==

"@cowprotocol/cow-sdk@^1.0.1-RC.8":
version "1.0.1-RC.8"
resolved "https://registry.yarnpkg.com/@cowprotocol/cow-sdk/-/cow-sdk-1.0.1-RC.8.tgz#91fc8765554e3976dcbec2135c9cdfb041bfe34d"
integrity sha512-kNzIeuhTOiRI6mVbHiS4PtEMMeTzgIOzLsI0VLtDQpqY8bRXqyaahs8xJLEISnX36gpPM4LZ2p+d5y76ZznCPQ==
"@cowprotocol/cow-sdk@^1.0.2-RC.7":
version "1.0.2-RC.7"
resolved "https://registry.yarnpkg.com/@cowprotocol/cow-sdk/-/cow-sdk-1.0.2-RC.7.tgz#8198e490d710210bed73eb281b81d6b3b034a20b"
integrity sha512-Op9I+EBiQYbQJINIA+t5GjSK30Qyecjh9/P5n0a4qKwsJQOVedq66s8w8GLmCfUQI/m7ys/73n8dSa9Z4H4zcA==
dependencies:
"@cowprotocol/app-data" "^0.0.2-RC.1"
"@cowprotocol/app-data" "^0.0.3-RC.0"
"@cowprotocol/contracts" "^1.3.1"
cross-fetch "^3.1.5"
ethers "^5.5.3"
Expand Down

0 comments on commit 037a3ee

Please sign in to comment.