Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
cb21750b
Unverified
Commit
cb21750b
authored
Jun 16, 2023
by
Jordan Frankfurt
Committed by
GitHub
Jun 16, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: remove unused types (#6791)
* fix: remove unused types * update name
parent
2e8ef480
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
13 deletions
+9
-13
ChainSelector.tsx
src/components/NavBar/ChainSelector.tsx
+8
-2
chains.ts
src/constants/chains.ts
+1
-11
No files found.
src/components/NavBar/ChainSelector.tsx
View file @
cb21750b
...
@@ -6,7 +6,13 @@ import { MouseoverTooltip } from 'components/Tooltip'
...
@@ -6,7 +6,13 @@ import { MouseoverTooltip } from 'components/Tooltip'
import
{
getConnection
}
from
'
connection
'
import
{
getConnection
}
from
'
connection
'
import
{
ConnectionType
}
from
'
connection/types
'
import
{
ConnectionType
}
from
'
connection/types
'
import
{
getChainInfo
}
from
'
constants/chainInfo
'
import
{
getChainInfo
}
from
'
constants/chainInfo
'
import
{
L1_CHAIN_IDS
,
L2_CHAIN_IDS
,
SupportedChainId
,
TESTNET_SET
,
UniWalletSupportedChains
}
from
'
constants/chains
'
import
{
L1_CHAIN_IDS
,
L2_CHAIN_IDS
,
SupportedChainId
,
TESTNET_CHAIN_IDS
,
UniWalletSupportedChains
,
}
from
'
constants/chains
'
import
{
useOnClickOutside
}
from
'
hooks/useOnClickOutside
'
import
{
useOnClickOutside
}
from
'
hooks/useOnClickOutside
'
import
useSelectChain
from
'
hooks/useSelectChain
'
import
useSelectChain
from
'
hooks/useSelectChain
'
import
useSyncChainQuery
from
'
hooks/useSyncChainQuery
'
import
useSyncChainQuery
from
'
hooks/useSyncChainQuery
'
...
@@ -65,7 +71,7 @@ export const ChainSelector = ({ leftAlign }: ChainSelectorProps) => {
...
@@ -65,7 +71,7 @@ export const ChainSelector = ({ leftAlign }: ChainSelectorProps) => {
const
showTestnets
=
useAtomValue
(
showTestnetsAtom
)
const
showTestnets
=
useAtomValue
(
showTestnetsAtom
)
const
chains
=
showTestnets
const
chains
=
showTestnets
?
NETWORK_SELECTOR_CHAINS
?
NETWORK_SELECTOR_CHAINS
:
NETWORK_SELECTOR_CHAINS
.
filter
((
chain
)
=>
!
TESTNET_
SET
.
has
(
chain
))
:
NETWORK_SELECTOR_CHAINS
.
filter
((
chain
)
=>
!
TESTNET_
CHAIN_IDS
.
has
(
chain
))
const
ref
=
useRef
<
HTMLDivElement
>
(
null
)
const
ref
=
useRef
<
HTMLDivElement
>
(
null
)
const
modalRef
=
useRef
<
HTMLDivElement
>
(
null
)
const
modalRef
=
useRef
<
HTMLDivElement
>
(
null
)
...
...
src/constants/chains.ts
View file @
cb21750b
...
@@ -79,15 +79,7 @@ export const UNSUPPORTED_V2POOL_CHAIN_IDS = [
...
@@ -79,15 +79,7 @@ export const UNSUPPORTED_V2POOL_CHAIN_IDS = [
SupportedChainId
.
ARBITRUM_GOERLI
,
SupportedChainId
.
ARBITRUM_GOERLI
,
]
as
const
]
as
const
export
const
TESTNET_CHAIN_IDS
=
[
export
const
TESTNET_CHAIN_IDS
=
new
Set
([
SupportedChainId
.
GOERLI
,
SupportedChainId
.
SEPOLIA
,
SupportedChainId
.
POLYGON_MUMBAI
,
SupportedChainId
.
ARBITRUM_GOERLI
,
SupportedChainId
.
OPTIMISM_GOERLI
,
]
as
const
export
const
TESTNET_SET
=
new
Set
([
SupportedChainId
.
GOERLI
,
SupportedChainId
.
GOERLI
,
SupportedChainId
.
SEPOLIA
,
SupportedChainId
.
SEPOLIA
,
SupportedChainId
.
ARBITRUM_GOERLI
,
SupportedChainId
.
ARBITRUM_GOERLI
,
...
@@ -97,8 +89,6 @@ export const TESTNET_SET = new Set([
...
@@ -97,8 +89,6 @@ export const TESTNET_SET = new Set([
SupportedChainId
.
CELO_ALFAJORES
,
SupportedChainId
.
CELO_ALFAJORES
,
])
])
export
type
SupportedTestnetChainId
=
typeof
TESTNET_CHAIN_IDS
[
number
]
/**
/**
* All the chain IDs that are running the Ethereum protocol.
* All the chain IDs that are running the Ethereum protocol.
*/
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment