Skip to content

Commit

Permalink
Merge branch 'armando/grwth-3279-detect-testnetmainnet-wallet-and-ask…
Browse files Browse the repository at this point in the history
…-user-if-they-want-to' into dev
  • Loading branch information
r3lays committed Dec 14, 2023
2 parents a69149d + 79cde84 commit fc9a91f
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 fc9a91f

Please sign in to comment.