Skip to content

Commit

Permalink
chore: hide Music Festival Badge (#131)
Browse files Browse the repository at this point in the history
* chore: hide Music Festival Badge

* chore: fix tests
  • Loading branch information
aleortega authored Nov 19, 2024
1 parent d27b71c commit edf71c0
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion api/src/adapters/badge-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export async function createBadgeService({
}

function getAllBadges(): Badge[] {
return Array.from(badges.values())
return Array.from(badges.values()).filter((badge) => badge.id !== BadgeId.MUSIC_FESTIVAL_2024)
}

async function getUserStates(address: EthAddress) {
Expand Down
2 changes: 1 addition & 1 deletion api/src/logic/backfill-merger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export function createBackfillMergerComponent({
badgeService.getBadge(BadgeId.OPEN_FOR_BUSINESS),
backfillData
)
case BadgeId.MUSIC_FESTIVAL:
case BadgeId.MUSIC_FESTIVAL_2024:
return mergeUniqueEventProgress(
userAddress,
currentUserProgress,
Expand Down
2 changes: 1 addition & 1 deletion api/test/unit/adapters/badge-service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('Badge Service', () => {
describe('getAllBadges', () => {
it('should return an array with all the badges definitions', async () => {
const allBadges = badgeService.getAllBadges()
const allExpectedBadges = Array.from(badgeStorage.getBadges().values())
const allExpectedBadges = Array.from(badgeStorage.getBadges().values()).filter((badge) => badge.id !== BadgeId.MUSIC_FESTIVAL_2024)

expect(allBadges).toStrictEqual(allExpectedBadges)
})
Expand Down
2 changes: 1 addition & 1 deletion api/test/unit/logic/backfill-merger.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe('Backfill Merger', () => {
[BadgeId.LAND_ARCHITECT, mergeLandArchitectProgress],
[BadgeId.PROFILE_PRO, mergeProfileProProgress],
[BadgeId.OPEN_FOR_BUSINESS, mergeOpenForBusinessProgress],
[BadgeId.MUSIC_FESTIVAL, mergeUniqueEventProgress]
// [BadgeId.MUSIC_FESTIVAL, mergeUniqueEventProgress]
])('should merge the progress for the user when the badge id is %s', (badgeId: BadgeId, merger: jest.Mock) => {
const mergerMock = merger as jest.Mock

Expand Down
2 changes: 1 addition & 1 deletion common/src/types/badge-definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export enum BadgeId {
LAND_ARCHITECT = 'land_architect',
EMOTE_CREATOR = 'emote_creator',
WEARABLE_DESIGNER = 'wearable_designer',
MUSIC_FESTIVAL = 'music_festival_2024'
MUSIC_FESTIVAL_2024 = 'music_festival_2024'
}

export enum BadgeCategory {
Expand Down
4 changes: 2 additions & 2 deletions common/src/types/badges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,9 @@ const badges: Map<BadgeId, Badge> = new Map<BadgeId, Badge>([
}
],
[
BadgeId.MUSIC_FESTIVAL,
BadgeId.MUSIC_FESTIVAL_2024,
{
id: BadgeId.MUSIC_FESTIVAL,
id: BadgeId.MUSIC_FESTIVAL_2024,
name: 'Decentraland Music Festival 2024',
category: BadgeCategory.EXPLORER,
description: 'Jumped in and attended Decentraland Music Festival 2024',
Expand Down

0 comments on commit edf71c0

Please sign in to comment.