Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
fionnachan committed Oct 21, 2024
1 parent 218d1d2 commit bc449af
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,10 @@ function NetworksPanel({
const coreNetworks = chainIds.filter(
chainId => isNetwork(chainId).isCoreChain
)
const otherNetworks = chainIds.filter(chainId => isNetwork(chainId).isBase)
const otherNetworks = chainIds.filter(
chainId =>
!isNetwork(chainId).isCoreChain && !isNetwork(chainId).isOrbitChain
)
const orbitNetworks = chainIds.filter(
chainId => isNetwork(chainId).isOrbitChain
)
Expand Down
8 changes: 4 additions & 4 deletions packages/arb-token-bridge-ui/src/util/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const getChains = () => {
return chains.filter(chain => {
// exclude L1 chains or Base Chains with no child chains
if (
!('parentChainId' in chain) &&
isNonArbParentChain(chain) &&
getChildrenForNetwork(chain.chainId).length === 0
) {
return false
Expand Down Expand Up @@ -206,12 +206,12 @@ export function removeCustomChainFromLocalStorage(chainId: number) {
)
}

// Only support testnet chains
export const supportedCustomOrbitParentChains = [
ChainId.Sepolia,
ChainId.Holesky,
ChainId.ArbitrumSepolia,
ChainId.BaseSepolia,
ChainId.Base
ChainId.BaseSepolia
]

export const rpcURLs: { [chainId: number]: string } = {
Expand Down Expand Up @@ -270,7 +270,7 @@ export const getExplorerUrl = (chainId: ChainId) => {
export const getL1BlockTime = (chainId: number) => {
const chain = getChainByChainId(getBaseChainIdByChainId({ chainId }))

if (!chain || !('blockTime' in chain)) {
if (!chain || !isNonArbParentChain(chain)) {
throw new Error(`Couldn't get block time. Unexpected chain ID: ${chainId}`)
}

Expand Down

0 comments on commit bc449af

Please sign in to comment.