Commit b906cddc authored by Charles Bachmeier's avatar Charles Bachmeier Committed by GitHub

fix: update depedencies to fix avax/bnb routing (#6974)

* fix: update depedencies to fix avax/bnb routing

* pull latest

* use rpc_url

* deduplicate
parent 65fe8d41
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
"buffer": "^6.0.3", "buffer": "^6.0.3",
"concurrently": "^8.0.1", "concurrently": "^8.0.1",
"cypress": "12.12.0", "cypress": "12.12.0",
"cypress-hardhat": "^2.4.2", "cypress-hardhat": "^2.5.0",
"env-cmd": "^10.1.0", "env-cmd": "^10.1.0",
"eslint": "^7.11.0", "eslint": "^7.11.0",
"eslint-plugin-import": "^2.27", "eslint-plugin-import": "^2.27",
...@@ -172,21 +172,21 @@ ...@@ -172,21 +172,21 @@
"@uniswap/conedison": "^1.8.0", "@uniswap/conedison": "^1.8.0",
"@uniswap/governance": "^1.0.2", "@uniswap/governance": "^1.0.2",
"@uniswap/liquidity-staker": "^1.0.2", "@uniswap/liquidity-staker": "^1.0.2",
"@uniswap/merkle-distributor": "1.0.1", "@uniswap/merkle-distributor": "^1.0.1",
"@uniswap/permit2-sdk": "1.2.0", "@uniswap/permit2-sdk": "^1.2.0",
"@uniswap/redux-multicall": "^1.1.8", "@uniswap/redux-multicall": "^1.1.8",
"@uniswap/router-sdk": "^1.3.0", "@uniswap/router-sdk": "^1.6.0",
"@uniswap/sdk-core": "^3.2.6", "@uniswap/sdk-core": "^4.0.3",
"@uniswap/smart-order-router": "3.13.5", "@uniswap/smart-order-router": "^3.13.7",
"@uniswap/token-lists": "^1.0.0-beta.33", "@uniswap/token-lists": "^1.0.0-beta.33",
"@uniswap/uniswapx-sdk": "^1.0.0", "@uniswap/uniswapx-sdk": "^1.0.1",
"@uniswap/universal-router-sdk": "^1.5.3", "@uniswap/universal-router-sdk": "^1.5.4",
"@uniswap/v2-core": "1.0.0", "@uniswap/v2-core": "^1.0.1",
"@uniswap/v2-periphery": "^1.1.0-beta.0", "@uniswap/v2-periphery": "^1.1.0-beta.0",
"@uniswap/v2-sdk": "^3.0.1", "@uniswap/v2-sdk": "^3.2.0",
"@uniswap/v3-core": "1.0.0", "@uniswap/v3-core": "^1.0.1",
"@uniswap/v3-periphery": "^1.1.1", "@uniswap/v3-periphery": "^1.1.1",
"@uniswap/v3-sdk": "^3.9.0", "@uniswap/v3-sdk": "^3.10.0",
"@vanilla-extract/css": "^1.7.2", "@vanilla-extract/css": "^1.7.2",
"@vanilla-extract/css-utils": "^0.1.2", "@vanilla-extract/css-utils": "^0.1.2",
"@vanilla-extract/dynamic": "^2.0.2", "@vanilla-extract/dynamic": "^2.0.2",
......
...@@ -16,10 +16,14 @@ export const CHAIN_IDS_TO_NAMES = { ...@@ -16,10 +16,14 @@ export const CHAIN_IDS_TO_NAMES = {
[ChainId.OPTIMISM_GOERLI]: 'optimism_goerli', [ChainId.OPTIMISM_GOERLI]: 'optimism_goerli',
[ChainId.BNB]: 'bnb', [ChainId.BNB]: 'bnb',
[ChainId.AVALANCHE]: 'avalanche', [ChainId.AVALANCHE]: 'avalanche',
[ChainId.BASE]: 'base',
[ChainId.BASE_GOERLI]: 'base_goerli',
} as const } as const
const NOT_YET_UX_SUPPORTED_CHAIN_IDS = [ChainId.BASE, ChainId.BASE_GOERLI] as const
export function isSupportedChain(chainId: number | null | undefined | ChainId): chainId is SupportedChainsType { export function isSupportedChain(chainId: number | null | undefined | ChainId): chainId is SupportedChainsType {
return !!chainId && SUPPORTED_CHAINS.indexOf(chainId) !== -1 return !!chainId && SUPPORTED_CHAINS.indexOf(chainId) !== -1 && NOT_YET_UX_SUPPORTED_CHAIN_IDS.indexOf(chainId) === -1
} }
export function asSupportedChain(chainId: number | null | undefined | ChainId): SupportedChainsType | undefined { export function asSupportedChain(chainId: number | null | undefined | ChainId): SupportedChainsType | undefined {
......
...@@ -103,11 +103,15 @@ export const FALLBACK_URLS = { ...@@ -103,11 +103,15 @@ export const FALLBACK_URLS = {
[ChainId.AVALANCHE]: [ [ChainId.AVALANCHE]: [
// "Safe" URLs // "Safe" URLs
'https://api.avax.network/ext/bc/C/rpc', 'https://api.avax.network/ext/bc/C/rpc',
'https://rpc.ankr.com/avalanche',
'https://avalanche.blockpi.network/v1/rpc/public',
'https://avalanche-c-chain.publicnode.com', 'https://avalanche-c-chain.publicnode.com',
'https://endpoints.omniatech.io/v1/avax/mainnet/public', ],
'https://ava-mainnet.public.blastapi.io/ext/bc/C/rpc', [ChainId.BASE]: [
// "Safe" URLs
'https://developer-access-mainnet.base.org',
],
[ChainId.BASE_GOERLI]: [
// "Safe" URLs
'https://goerli.base.org',
], ],
} }
...@@ -141,4 +145,6 @@ export const RPC_URLS = { ...@@ -141,4 +145,6 @@ export const RPC_URLS = {
[ChainId.CELO_ALFAJORES]: FALLBACK_URLS[ChainId.CELO_ALFAJORES], [ChainId.CELO_ALFAJORES]: FALLBACK_URLS[ChainId.CELO_ALFAJORES],
[ChainId.BNB]: [QUICKNODE_RPC_URL, ...FALLBACK_URLS[ChainId.BNB]], [ChainId.BNB]: [QUICKNODE_RPC_URL, ...FALLBACK_URLS[ChainId.BNB]],
[ChainId.AVALANCHE]: [`https://avalanche-mainnet.infura.io/v3/${INFURA_KEY}`, ...FALLBACK_URLS[ChainId.AVALANCHE]], [ChainId.AVALANCHE]: [`https://avalanche-mainnet.infura.io/v3/${INFURA_KEY}`, ...FALLBACK_URLS[ChainId.AVALANCHE]],
[ChainId.BASE]: [`https://base-mainnet.infura.io/v3/${INFURA_KEY}`, ...FALLBACK_URLS[ChainId.BASE]],
[ChainId.BASE_GOERLI]: [`https://base-goerli.infura.io/v3/${INFURA_KEY}`, ...FALLBACK_URLS[ChainId.BASE_GOERLI]],
} }
...@@ -71,4 +71,6 @@ export const RPC_PROVIDERS: { [key in SupportedChainsType]: StaticJsonRpcProvide ...@@ -71,4 +71,6 @@ export const RPC_PROVIDERS: { [key in SupportedChainsType]: StaticJsonRpcProvide
[ChainId.CELO_ALFAJORES]: new AppJsonRpcProvider(ChainId.CELO_ALFAJORES), [ChainId.CELO_ALFAJORES]: new AppJsonRpcProvider(ChainId.CELO_ALFAJORES),
[ChainId.BNB]: new AppJsonRpcProvider(ChainId.BNB), [ChainId.BNB]: new AppJsonRpcProvider(ChainId.BNB),
[ChainId.AVALANCHE]: new AppJsonRpcProvider(ChainId.AVALANCHE), [ChainId.AVALANCHE]: new AppJsonRpcProvider(ChainId.AVALANCHE),
[ChainId.BASE]: new AppJsonRpcProvider(ChainId.BASE),
[ChainId.BASE_GOERLI]: new AppJsonRpcProvider(ChainId.BASE_GOERLI),
} }
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment