Switch logic to includes
This commit is contained in:
parent
4fd0e5caad
commit
e970a908c6
|
@ -326,7 +326,7 @@ async function handleBettingStreakBadgeAward(
|
||||||
// TODO: check if already awarded 50th streak as well
|
// TODO: check if already awarded 50th streak as well
|
||||||
if (newBettingStreak === 1 && alreadyHasBadgeForFirstStreak) return
|
if (newBettingStreak === 1 && alreadyHasBadgeForFirstStreak) return
|
||||||
|
|
||||||
if (newBettingStreak in streakerBadgeRarityThresholds) {
|
if (streakerBadgeRarityThresholds.includes(newBettingStreak)) {
|
||||||
const badge = {
|
const badge = {
|
||||||
type: 'STREAKER',
|
type: 'STREAKER',
|
||||||
name: 'Streaker',
|
name: 'Streaker',
|
||||||
|
|
|
@ -50,7 +50,7 @@ async function handleMarketCreatorBadgeAward(contractCreator: User) {
|
||||||
.where('creatorId', '==', contractCreator.id)
|
.where('creatorId', '==', contractCreator.id)
|
||||||
.where('resolution', '!=', 'CANCEL')
|
.where('resolution', '!=', 'CANCEL')
|
||||||
)
|
)
|
||||||
if (contracts.length in marketCreatorBadgeRarityThresholds) {
|
if (marketCreatorBadgeRarityThresholds.includes(contracts.length)) {
|
||||||
const badge = {
|
const badge = {
|
||||||
type: 'MARKET_CREATOR',
|
type: 'MARKET_CREATOR',
|
||||||
name: 'Market Creator',
|
name: 'Market Creator',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user