Skip to content

Commit

Permalink
feat: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
braianj committed Apr 30, 2024
1 parent 7a65a31 commit 5948649
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
14 changes: 7 additions & 7 deletions src/modules/worlds/reducer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ describe('when handling the action to get worlds permissions for a world name',
state.loading = [getWorldPermissionsRequest(worldName)]
})

it('should remove the action from loading and set the stats', () => {
it('should remove the action from loading and set the permissions', () => {
const action = getWorldPermissionsSuccess(worldName, worldPermissionsMock)

expect(worldsReducer(state, action)).toEqual({
Expand Down Expand Up @@ -236,7 +236,7 @@ describe('when handling the action to post permission type for a world name', ()
})
})

describe('when handling the action to put an address in deployment permission for a world name', () => {
describe('when handling the action to add an address to the deployment permission for a world name', () => {
let worldName: string
let addressWallet: string

Expand All @@ -245,7 +245,7 @@ describe('when handling the action to put an address in deployment permission fo
addressWallet = '0x123'
})

describe('when handling the request action to put an address in deployment permission for a world name', () => {
describe('when handling the request action to add an address to the deployment permission for a world name', () => {
beforeEach(() => {
state.error = 'some error'
state.loading = []
Expand All @@ -261,7 +261,7 @@ describe('when handling the action to put an address in deployment permission fo
})
})

describe('when handling the failure action to put an address in deployment permission for a world name', () => {
describe('when handling the failure action to add an address to the deployment permission for a world name', () => {
let error: string

beforeEach(() => {
Expand All @@ -280,13 +280,13 @@ describe('when handling the action to put an address in deployment permission fo
})
})

describe('when handling the success action to put an address in deployment permission for a world name', () => {
describe('when handling the success action to add an address to the deployment permission for a world name', () => {
beforeEach(() => {
state.loading = [putWorldPermissionsRequest(worldName, WorldPermissionNames.Deployment, WorldPermissionType.AllowList, addressWallet)]
state.worldsPermissions[worldName] = worldPermissionsMock
})

it('should remove the action from loading and set the stats', () => {
it('should remove the action from loading and set the new address in the wallets for deployment permission', () => {
const action = putWorldPermissionsSuccess(worldName, WorldPermissionNames.Deployment, WorldPermissionType.AllowList, addressWallet)

expect(worldsReducer(state, action)).toEqual({
Expand Down Expand Up @@ -366,7 +366,7 @@ describe('when handling the action to delete an address from deployment permissi
}
})

it('should remove the action from loading and set the stats', () => {
it('should remove the action from loading and remove the wallet address from the wallets list of the given permission', () => {
const action = deleteWorldPermissionsSuccess(worldName, WorldPermissionNames.Deployment, WorldPermissionType.AllowList, addressWallet)

expect(worldsReducer(state, action)).toEqual({
Expand Down
3 changes: 0 additions & 3 deletions src/modules/worlds/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@ import {
PUT_WORLD_PERMISSIONS_SUCCESS
} from './actions'
import { AllowListPermissionSetting, WorldPermissionType, WorldPermissions, WorldsWalletStats } from 'lib/api/worlds'
import { Avatar } from '@dcl/schemas/dist/platform/profile/avatar'

export type WorldsState = {
// TODO: Find a use for the data object when there is something more relevant as the core data for the worlds module.
data: Record<string, unknown>
walletStats: Record<string, WorldsWalletStats>
worldsPermissions: Record<string, WorldPermissions>
profiles: Record<string, Avatar>
loading: LoadingState
error: string | null
}
Expand All @@ -48,7 +46,6 @@ export const INITIAL_STATE: WorldsState = {
data: {},
walletStats: {},
worldsPermissions: {},
profiles: {},
loading: [],
error: null
}
Expand Down

0 comments on commit 5948649

Please sign in to comment.