diff --git a/functions/src/weekly-markets-emails.ts b/functions/src/weekly-markets-emails.ts index 0cad16f8..82e1f660 100644 --- a/functions/src/weekly-markets-emails.ts +++ b/functions/src/weekly-markets-emails.ts @@ -24,6 +24,7 @@ async function getTrendingContracts() { .where('isResolved', '==', false) .where('closeTime', '>', Date.now() + DAY_MS) .where('visibility', '==', 'public') + .orderBy('closeTime', 'asc') .orderBy('popularityScore', 'desc') .limit(50) )