Skip to content

Commit

Permalink
fix: Use Sepolia limo url
Browse files Browse the repository at this point in the history
  • Loading branch information
LautaroPetaccio committed Nov 25, 2024
1 parent ab893d3 commit 23f0420
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 18 deletions.
29 changes: 15 additions & 14 deletions src/components/ENSListPage/ENSListPage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useCallback } from 'react'
import { Env } from '@dcl/ui-env'
import { Link, useHistory } from 'react-router-dom'
import { config } from 'config'
import { Popup, Button, Dropdown, Icon as DCLIcon } from 'decentraland-ui'
Expand All @@ -22,6 +23,7 @@ const PAGE_SIZE = 12
const MARKETPLACE_WEB_URL = config.get('MARKETPLACE_WEB_URL', '')
const MARKETPLACE_API = config.get('MARKETPLACE_API', '')
const REGISTRAR_CONTRACT_ADDRESS = config.get('REGISTRAR_CONTRACT_ADDRESS', '')
const ENS_GATEWAY = config.get('ENS_GATEWAY')

export default function ENSListPage(props: Props) {
const { ensList, alias, hasProfileCreated, avatar, isLoading, error, onOpenModal } = props
Expand All @@ -30,6 +32,17 @@ export default function ENSListPage(props: Props) {
const history = useHistory()

const handleAssignENS = useCallback((ens: ENS) => history.push(locations.ensSelectLand(ens.subdomain)), [history])
const buildENSLink = useCallback(
(ens: ENS) => {
if (config.is(Env.DEVELOPMENT)) {
const splittedDomain = ens.subdomain.split('.')
splittedDomain.splice(splittedDomain.length - 1, 0, 'istest')
return `https://${splittedDomain.join('.')}.${ENS_GATEWAY}`
}
return `https://${ens.subdomain}.${ENS_GATEWAY}`
},
[ENS_GATEWAY]
)

const handleOpenModal = useCallback(
(newName: string) => {
Expand Down Expand Up @@ -119,13 +132,7 @@ export default function ENSListPage(props: Props) {
<Icon name="pin" />
{ens.landId}
</span>
<Button
compact
className="ens-list-land-redirect"
target="_blank"
href={`https://${ens.subdomain}.${config.get('ENS_GATEWAY')}`}
rel="noopener noreferrer"
>
<Button compact className="ens-list-land-redirect" target="_blank" href={buildENSLink(ens)} rel="noopener noreferrer">
<Icon name="right-round-arrow" className="ens-list-land-redirect-icon" />
</Button>
</div>
Expand All @@ -137,13 +144,7 @@ export default function ENSListPage(props: Props) {
<Icon name="pin" />
{`Estate (${ens.landId})`}
</span>
<Button
compact
className="ens-list-land-redirect"
target="_blank"
href={`https://${ens.subdomain}.${config.get('ENS_GATEWAY')}`}
rel="noopener noreferrer"
>
<Button compact className="ens-list-land-redirect" target="_blank" href={buildENSLink(ens)} rel="noopener noreferrer">
<Icon name="right-round-arrow" className="ens-list-land-redirect-icon" />
</Button>
</div>
Expand Down
3 changes: 1 addition & 2 deletions src/config/env/dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"EMAIL_SERVER_URL": "https://subscription.decentraland.org/subscribe",
"PEER_URL": "https://peer.decentraland.zone",
"ERC721_COLLECTION_BASE_URI": "https://peer.decentraland.zone/lambdas/collections/standard/erc721/",
"BUILDER_SERVER_URL": "https://builder-api.decentraland.zone/v1",
"BUILDER_SERVER_URL": "http://localhost:5001/v1",
"MARKETPLACE_URL": "https://api.decentraland.zone/v1",
"MARKETPLACE_API": "https://marketplace-api.decentraland.zone/v1",
"DOCS_URL": "https://docs.decentraland.org",
Expand All @@ -25,7 +25,6 @@
"RESOLVER_CONTRACT_ADDRESS": "0x8FADE66B79cC9f707aB26799354482EB93a5B7dD",
"REGISTRAR_CONTRACT_ADDRESS": "0x7518456ae93eb98f3e64571b689c626616bb7f30",
"RENTALS_CONTRACT_ADDRESS": "0xe70db6319e9cee3f604909bdade58d1f5c1cf702",
"IPFS_URL": "https://ipfs.infura.io:5001/api/v0/add?pin=false",
"EXPLORER_URL": "https://decentraland.zone/play",
"TRANSACTIONS_API_URL": "https://transactions-api.decentraland.zone/v1",
"ACCOUNT_URL": "https://decentraland.zone/account",
Expand Down
1 change: 0 additions & 1 deletion src/config/env/prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"RESOLVER_CONTRACT_ADDRESS": "0x4976fb03c32e5b8cfe2b6ccb31c09ba78ebaba41",
"REGISTRAR_CONTRACT_ADDRESS": "0x2a187453064356c898cae034eaed119e1663acb8",
"RENTALS_CONTRACT_ADDRESS": "0x3a1469499d0be105d4f77045ca403a5f6dc2f3f5",
"IPFS_URL": "https://ipfs.infura.io:5001/api/v0/add?pin=false",
"EXPLORER_URL": "https://decentraland.org/play",
"TRANSACTIONS_API_URL": "https://transactions-api.decentraland.org/v1",
"ACCOUNT_URL": "https://decentraland.org/account",
Expand Down
1 change: 0 additions & 1 deletion src/config/env/stg.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"RESOLVER_CONTRACT_ADDRESS": "0x4976fb03c32e5b8cfe2b6ccb31c09ba78ebaba41",
"REGISTRAR_CONTRACT_ADDRESS": "0x2a187453064356c898cae034eaed119e1663acb8",
"RENTALS_CONTRACT_ADDRESS": "0x3a1469499d0be105d4f77045ca403a5f6dc2f3f5",
"IPFS_URL": "https://ipfs.infura.io:5001/api/v0/add?pin=false",
"EXPLORER_URL": "https://decentraland.org/play",
"TRANSACTIONS_API_URL": "https://transactions-api.decentraland.today/v1",
"ACCOUNT_URL": "https://decentraland.today/account",
Expand Down

0 comments on commit 23f0420

Please sign in to comment.