diff --git a/functions/src/on-create-bet.ts b/functions/src/on-create-bet.ts index 0175a63e..0881abe5 100644 --- a/functions/src/on-create-bet.ts +++ b/functions/src/on-create-bet.ts @@ -326,7 +326,7 @@ async function handleBettingStreakBadgeAward( // TODO: check if already awarded 50th streak as well if (newBettingStreak === 1 && alreadyHasBadgeForFirstStreak) return - if (newBettingStreak in streakerBadgeRarityThresholds) { + if (streakerBadgeRarityThresholds.includes(newBettingStreak)) { const badge = { type: 'STREAKER', name: 'Streaker', diff --git a/functions/src/on-create-contract.ts b/functions/src/on-create-contract.ts index 13a84575..43a66719 100644 --- a/functions/src/on-create-contract.ts +++ b/functions/src/on-create-contract.ts @@ -50,7 +50,7 @@ async function handleMarketCreatorBadgeAward(contractCreator: User) { .where('creatorId', '==', contractCreator.id) .where('resolution', '!=', 'CANCEL') ) - if (contracts.length in marketCreatorBadgeRarityThresholds) { + if (marketCreatorBadgeRarityThresholds.includes(contracts.length)) { const badge = { type: 'MARKET_CREATOR', name: 'Market Creator',