Skip to content

Commit

Permalink
Revert "fix: moves-master backfill (#104)"
Browse files Browse the repository at this point in the history
This reverts commit 10f708d.
  • Loading branch information
aleortega committed Oct 7, 2024
1 parent 6a2dbbb commit db23b99
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions api/src/logic/backfills/moves-master-backfill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ function validateMovesMasterBackfillData(data: BackfillData): boolean {
return (
Number.isInteger(data.progress.usedEmotesCount) &&
Array.isArray(data.progress.achievedTiers) &&
data.progress.achievedTiers.every(
(tier) =>
(Number.isInteger(tier.steps) || Number.isFinite(Number(tier.steps))) && Number.isInteger(tier.completedAt)
) &&
data.progress.achievedTiers.every((tier) => Number.isInteger(tier.steps) && Number.isInteger(tier.completedAt)) &&
Number.isInteger(data.progress.lastEmoteTriggeredAt) &&
data.progress.lastEmoteTriggeredAt > 0
)
Expand Down Expand Up @@ -49,7 +46,7 @@ export function mergeMovesMasterProgress(

try {
backfillData.progress.achievedTiers.forEach((tier) => {
const achievedTier = badge.tiers?.find((badgeTier) => badgeTier.criteria.steps === Number(tier.steps))
const achievedTier = badge.tiers?.find((badgeTier) => badgeTier.criteria.steps === tier.steps)

if (!achievedTier) {
throw new Error('tierId received is invalid, breaking backfill')
Expand Down

0 comments on commit db23b99

Please sign in to comment.