aboutsummaryrefslogtreecommitdiff
path: root/src/database.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/database.ts')
-rw-r--r--src/database.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/database.ts b/src/database.ts
index e31794a..2cbab72 100644
--- a/src/database.ts
+++ b/src/database.ts
@@ -1138,7 +1138,8 @@ function toItemAuctionsSchemaBson(i: ItemAuctionsSchema): ItemAuctionsSchemaBson
id: createUuid(a.id)
}
}),
- oldestDate: i.auctions[0]?.ts ?? 0
+ // we sort by oldestDate to get the volume sold, but we don't want brand new items with like no data having a high frequency
+ oldestDate: i.auctions.length > 10 ? i.auctions[0]?.ts ?? 0 : 0
}
}