• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

decentraland / marketplace / 12537635746

29 Dec 2024 06:09PM UTC coverage: 66.129% (-0.1%) from 66.252%
12537635746

Pull #2344

github

LautaroPetaccio
fix: Owner being shown in the item detail page when the item is L1
Pull Request #2344: fix: Multiple off chain issues

2689 of 5279 branches covered (50.94%)

Branch coverage included in aggregate %.

1 of 2 new or added lines in 2 files covered. (50.0%)

12 existing lines in 5 files now uncovered.

7852 of 10661 relevant lines covered (73.65%)

77.28 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

71.43
/webapp/src/modules/tile/reducer.ts
1
import { LoadingState, loadingReducer } from 'decentraland-dapps/dist/modules/loading/reducer'
34✔
2
import { AtlasTile } from 'decentraland-ui'
3
import {
4
  FetchTilesRequestAction,
5
  FetchTilesSuccessAction,
6
  FetchTilesFailureAction,
7
  FETCH_TILES_REQUEST,
8
  FETCH_TILES_SUCCESS,
9
  FETCH_TILES_FAILURE
10
} from './actions'
34✔
11

12
export type TileState = {
13
  data: Record<string, AtlasTile>
14
  lastModified: Date | null
15
  loading: LoadingState
16
  error: string | null
17
}
18

19
const INITIAL_STATE: TileState = {
34✔
20
  data: {},
21
  lastModified: null,
22
  loading: [],
23
  error: null
24
}
25

26
type TileReducerAction = FetchTilesRequestAction | FetchTilesSuccessAction | FetchTilesFailureAction
27

28
export function tileReducer(state = INITIAL_STATE, action: TileReducerAction) {
305✔
29
  switch (action.type) {
2,230!
30
    case FETCH_TILES_REQUEST: {
31
      return {
250✔
32
        ...state,
33
        lastModified: null,
34
        loading: loadingReducer(state.loading, action)
35
      }
36
    }
37
    case FETCH_TILES_SUCCESS: {
UNCOV
38
      return {
×
39
        ...state,
40
        loading: loadingReducer(state.loading, action),
41
        lastModified: action.payload.lastModified,
42
        error: null,
43
        data: action.payload.tiles
44
      }
45
    }
46
    case FETCH_TILES_FAILURE: {
47
      return {
×
48
        ...state,
49
        loading: loadingReducer(state.loading, action),
50
        error: action.payload.error
51
      }
52
    }
53
    default:
54
      return state
1,980✔
55
  }
56
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc