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

decentraland / marketplace / 8204259383

08 Mar 2024 01:50PM UTC coverage: 66.188% (-0.05%) from 66.242%
8204259383

Pull #2169

github

juanmahidalgo
feat: remove arrow fn
Pull Request #2169: feat: Add cross chain payments for LANDs

2516 of 4918 branches covered (51.16%)

Branch coverage included in aggregate %.

1 of 4 new or added lines in 1 file covered. (25.0%)

4 existing lines in 4 files now uncovered.

7618 of 10393 relevant lines covered (73.3%)

70.39 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 { AtlasTile } from 'decentraland-ui'
2
import {
3
  LoadingState,
4
  loadingReducer
5
} from 'decentraland-dapps/dist/modules/loading/reducer'
28✔
6
import {
7
  FetchTilesRequestAction,
8
  FetchTilesSuccessAction,
9
  FetchTilesFailureAction,
10
  FETCH_TILES_REQUEST,
11
  FETCH_TILES_SUCCESS,
12
  FETCH_TILES_FAILURE
13
} from './actions'
28✔
14

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

22
const INITIAL_STATE: TileState = {
28✔
23
  data: {},
24
  lastModified: null,
25
  loading: [],
26
  error: null
27
}
28

29
type TileReducerAction =
30
  | FetchTilesRequestAction
31
  | FetchTilesSuccessAction
32
  | FetchTilesFailureAction
33

34
export function tileReducer(state = INITIAL_STATE, action: TileReducerAction) {
237✔
35
  switch (action.type) {
1,961!
36
    case FETCH_TILES_REQUEST: {
37
      return {
237✔
38
        ...state,
39
        lastModified: null,
40
        loading: loadingReducer(state.loading, action)
41
      }
42
    }
43
    case FETCH_TILES_SUCCESS: {
44
      return {
×
45
        ...state,
46
        loading: loadingReducer(state.loading, action),
47
        lastModified: action.payload.lastModified,
48
        error: null,
49
        data: action.payload.tiles
50
      }
51
    }
52
    case FETCH_TILES_FAILURE: {
UNCOV
53
      return {
×
54
        ...state,
55
        loading: loadingReducer(state.loading, action),
56
        error: action.payload.error
57
      }
58
    }
59
    default:
60
      return state
1,724✔
61
  }
62
}
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