Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions src/Classes/APIBots/ReservoirListBot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,18 +205,22 @@ export class ReservoirListBot extends APIPollBot {
embed.setThumbnail(assetUrl)
}

embed.addFields(
{
// Only add Collection field if curationStatus has a value
const fields = []
if (curationStatus && curationStatus.trim()) {
fields.push({
name: `Collection`,
value: `${curationStatus}`,
inline: true,
},
{
name: 'Live Script',
value: `[view on artblocks.io](${tokenUrl + LISTING_UTM})`,
inline: true,
}
)
})
}
fields.push({
name: 'Live Script',
value: `[view on artblocks.io](${tokenUrl + LISTING_UTM})`,
inline: true,
})

embed.addFields(...fields)

const platformUrl = listing.source?.url

Expand Down
34 changes: 25 additions & 9 deletions src/Classes/APIBots/ReservoirSaleBot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,18 +250,22 @@ export class ReservoirSaleBot extends APIPollBot {
assetUrl = await replaceVideoWithGIF(assetUrl)
embed.setThumbnail(assetUrl)
}
embed.addFields(
{
// Only add Collection field if curationStatus has a value
const fields = []
if (curationStatus && curationStatus.trim()) {
fields.push({
name: `Collection`,
value: `${curationStatus}`,
inline: true,
},
{
name: 'Live Script',
value: `[view on artblocks.io](${tokenUrl + SALE_UTM})`,
inline: true,
}
)
})
}
fields.push({
name: 'Live Script',
value: `[view on artblocks.io](${tokenUrl + SALE_UTM})`,
inline: true,
})

embed.addFields(...fields)
// Update to remove author name and to reflect this info in piece name
// rather than token number as the title and URL field..
embed.setTitle(title)
Expand Down Expand Up @@ -318,6 +322,18 @@ export class ReservoirSaleBot extends APIPollBot {
return false
}

if (
sale.price.amount.decimal < 0.1 &&
sale.price.currency.symbol.includes('ETH')
) {
console.log(
'Skipping twitter sale for low-value sale',
sale.price.amount.decimal,
sale.price.currency.symbol
)
return false
}

// Filter out mint events (though these should already be filtered out)
if (sale.orderKind === 'mint') {
return false
Expand Down
3 changes: 3 additions & 0 deletions src/Classes/APIBots/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ const acceptedVerticals = [
'explorations',
'engine',
'presents',
'factory',
'playground',
'studio',
]
export function isVerticalName(msg: string): boolean {
return acceptedVerticals.includes(msg)
Expand Down
11 changes: 0 additions & 11 deletions src/Data/queryGraphQL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,9 +545,6 @@ export async function getArtistsTwitterHandles(): Promise<Map<string, string>> {
const handle = sanitizeTwitterHandle(twitter)
if (handle) {
artistTwitterMap.set(artistName, handle)
console.log(
`Mapped artist "${artistName}" to Twitter handle "@${handle}" (from Hasura)`
)
} else {
console.warn(
`Could not extract Twitter handle from URL: ${twitter} for artist: ${artistName}`
Expand Down Expand Up @@ -576,15 +573,7 @@ export async function getArtistsTwitterHandles(): Promise<Map<string, string>> {
const handle = sanitizeTwitterHandle(artist.twitterUsername)

if (handle) {
const wasOverwritten = artistTwitterMap.has(artist.name)
artistTwitterMap.set(artist.name, handle)
console.log(
`Mapped artist "${
artist.name
}" to Twitter handle "@${handle}" (from JSON${
wasOverwritten ? ' - overwriting Hasura data' : ''
})`
)
}
}
})
Expand Down