Skip to content

Commit

Permalink
refactor(zora): refactor getExternalUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
mmackz committed Jul 19, 2024
1 parent 1240bf6 commit f6b75d5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/zora/src/Zora.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,8 @@ export const getExternalUrl = async (

if (chainSlug) {
const referralParams = `?referrer=${referral ?? ZORA_DEPLOYER_ADDRESS}`
const baseUrl = `https://${
isTestnet ? 'testnet.' : ''
}zora.co/collect/${chainSlug}:${contractAddress}`
const domain = isTestnet ? 'testnet.zora.co' : 'zora.co'
const baseUrl = `https://${domain}/collect/${chainSlug}:${contractAddress}`

return tokenId != null
? `${baseUrl}/${tokenId}${referralParams}`
Expand Down

0 comments on commit f6b75d5

Please sign in to comment.