fix: purchase tweet url (#6987)

This commit is contained in:
Jack Short 2023-07-21 10:24:55 -04:00 committed by GitHub
parent 34a22ef9f0
commit ff3bcc4693
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -86,9 +86,10 @@ export const generateTweetForAsset = (asset: GenieAsset): string => {
export const generateTweetForPurchase = (assets: UpdatedGenieAsset[], txHashUrl: string): string => {
const multipleCollections = assets.length > 0 && assets.some((asset) => asset.address !== assets[0].address)
const collectionUrl = assets.length > 0 && !multipleCollections ? `/collection/${assets[0].address}` : ''
const tweetText = `I just purchased ${
multipleCollections ? `${assets.length} NFTs` : `${assets.length} ${assets[0].collectionName ?? 'NFT'}`
} with @Uniswap 🦄\n\nhttps://app.uniswap.org/#/nfts/collection/0x60bb1e2aa1c9acafb4d34f71585d7e959f387769\n${txHashUrl}`
} with @Uniswap 🦄\n\nhttps://app.uniswap.org/#/nfts${collectionUrl}\n${txHashUrl}`
return `https://twitter.com/intent/tweet?text=${encodeURIComponent(tweetText)}`
}