Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
justraman committed Dec 16, 2024
1 parent f23aa9f commit b2b7604
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/mappings/marketplace/events/listing_filled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ export async function listingFilled(

await Promise.all([ctx.store.save(listing), ctx.store.save(sale)])

if (listing.data.listingType !== ListingType.Offer) {
if (listing.data.listingType === ListingType.Offer) {
await ctx.store.save(listing.takeAssetId)
syncCollectionStats(listing.takeAssetId.collection.id)
} else {
if (listing.makeAssetId.bestListing?.id === listing.id && data.amountRemaining === 0n) {
const bestListing = await getBestListing(ctx, listing.makeAssetId.id)
listing.makeAssetId.bestListing = null
Expand Down

0 comments on commit b2b7604

Please sign in to comment.