Skip to content

Commit

Permalink
fix: Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
fzavalia committed Oct 9, 2023
1 parent 213ec11 commit 36d8e04
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getLocalStorage } from 'decentraland-dapps/dist/lib/localStorage'
import { LocalStorage } from 'decentraland-dapps/dist/lib/types'
import {
LOCALSTORAGE_WORLDS_FOR_ENS_OWNERS_ANNOUCEMENT,
LOCALSTORAGE_WORLDS_FOR_ENS_OWNERS_ANNOUNCEMENT,
canOpenWorldsForENSOwnersAnnouncementModal,
persistCanOpenWorldsForENSOwnersAnnouncementModal
} from './utils'
Expand Down Expand Up @@ -47,15 +47,15 @@ describe('when persisting if the worlds for ens owners announcement modal can be
it('should call the set item local storage method with undefined', () => {
persistCanOpenWorldsForENSOwnersAnnouncementModal(true)

expect(setItem).toHaveBeenCalledWith(LOCALSTORAGE_WORLDS_FOR_ENS_OWNERS_ANNOUCEMENT, undefined)
expect(setItem).toHaveBeenCalledWith(LOCALSTORAGE_WORLDS_FOR_ENS_OWNERS_ANNOUNCEMENT, undefined)
})
})

describe('when the value is false', () => {
it('should call the set item local storage method with "1"', () => {
persistCanOpenWorldsForENSOwnersAnnouncementModal(false)

expect(setItem).toHaveBeenCalledWith(LOCALSTORAGE_WORLDS_FOR_ENS_OWNERS_ANNOUCEMENT, '1')
expect(setItem).toHaveBeenCalledWith(LOCALSTORAGE_WORLDS_FOR_ENS_OWNERS_ANNOUNCEMENT, '1')
})
})
})
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { getLocalStorage } from 'decentraland-dapps/dist/lib/localStorage'

export const LOCALSTORAGE_WORLDS_FOR_ENS_OWNERS_ANNOUCEMENT = 'builder-worlds-for-ens-owners-announcement'
export const LOCALSTORAGE_WORLDS_FOR_ENS_OWNERS_ANNOUNCEMENT = 'builder-worlds-for-ens-owners-announcement'

export const persistCanOpenWorldsForENSOwnersAnnouncementModal = (canOpen: boolean) => {
const ls = getLocalStorage()
ls.setItem(LOCALSTORAGE_WORLDS_FOR_ENS_OWNERS_ANNOUCEMENT, canOpen ? undefined : '1')
ls.setItem(LOCALSTORAGE_WORLDS_FOR_ENS_OWNERS_ANNOUNCEMENT, canOpen ? undefined : '1')
}

export const canOpenWorldsForENSOwnersAnnouncementModal = () => {
const ls = getLocalStorage()
return ls.getItem(LOCALSTORAGE_WORLDS_FOR_ENS_OWNERS_ANNOUCEMENT) !== '1'
return ls.getItem(LOCALSTORAGE_WORLDS_FOR_ENS_OWNERS_ANNOUNCEMENT) !== '1'
}

0 comments on commit 36d8e04

Please sign in to comment.