Skip to content

Commit

Permalink
feat: change testnet check
Browse files Browse the repository at this point in the history
  • Loading branch information
r3lays committed Dec 14, 2023
1 parent 59526ed commit 79cde84
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions hooks/useIsUnsupportedChain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,15 @@ const MAINNET_CHAINS: Chain[] = [
reservoirChains.scroll,
]

const IS_TESTNET_DEPLOYMENT = process.env.NEXT_PUBLIC_HOST_URL?.includes(
'testnets.reservoir.tools'
)
const MAINNET_DEPLOYMENT_URLS = [
'explorer.reservoir.tools',
'explorer-dev.reservoir.tools',
]

const IS_TESTNET_DEPLOYMENT =
!MAINNET_DEPLOYMENT_URLS.includes(
process.env.NEXT_PUBLIC_HOST_URL as string
) && process.env.NEXT_PUBLIC_HOST_URL === 'testnets.reservoir.tools'

export default () => {
const [unsupportedChain, setUnsupportedChain] = useState<Chain | undefined>(
Expand Down

0 comments on commit 79cde84

Please sign in to comment.