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

decentraland / marketplace / 8253982565

12 Mar 2024 06:27PM UTC coverage: 66.11% (-0.1%) from 66.221%
8253982565

Pull #2183

github

LautaroPetaccio
fix: Test
Pull Request #2183: fix: Linting rules (no-unsafe-declaration-merging, no-redundant-type-constituents, no-unnecessary-type-assertion, ...)

2509 of 4914 branches covered (51.06%)

Branch coverage included in aggregate %.

3 of 3 new or added lines in 3 files covered. (100.0%)

12 existing lines in 5 files now uncovered.

7424 of 10111 relevant lines covered (73.42%)

72.06 hits per line

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

68.18
/webapp/src/modules/tile/sagas.ts
1
import { takeEvery, call, put } from 'redux-saga/effects'
28✔
2
import { RentalStatus } from '@dcl/schemas'
28✔
3
import { AxiosResponse } from 'axios'
4
import { atlasAPI } from '../../modules/vendor/decentraland'
28✔
5
import { FETCH_TILES_REQUEST, FetchTilesRequestAction, fetchTilesSuccess, fetchTilesFailure } from './actions'
28✔
6
import { ConnectWalletSuccessAction, CONNECT_WALLET_SUCCESS } from 'decentraland-dapps/dist/modules/wallet/actions'
28✔
7
import { t } from 'decentraland-dapps/dist/modules/translation/utils'
28✔
8
import { isErrorWithMessage } from '../../lib/error'
28✔
9
import { fetchNFTsRequest } from '../nft/actions'
28✔
10
import { VendorName } from '../vendor'
28✔
11
import { View } from '../ui/types'
28✔
12
import { AtlasTile } from 'decentraland-ui'
13

14
export function* tileSaga() {
237✔
15
  yield takeEvery(FETCH_TILES_REQUEST, handleFetchTilesRequest)
237✔
16
  yield takeEvery(CONNECT_WALLET_SUCCESS, handleConnectWalletSuccess)
237✔
17
}
18

19
function* handleFetchTilesRequest(_action: FetchTilesRequestAction) {
20
  try {
237✔
21
    const response: AxiosResponse<{
22
      data: Record<string, AtlasTile>
23
    }> = yield call(atlasAPI.fetchTiles)
237✔
UNCOV
24
    const tiles = response.data.data
×
UNCOV
25
    const lastModified = response.headers['last-modified']
×
UNCOV
26
    yield put(fetchTilesSuccess(tiles, new Date(lastModified)))
×
27
  } catch (error) {
28
    yield put(fetchTilesFailure(isErrorWithMessage(error) ? error.message : t('global.unknown_error')))
×
29
  }
30
}
31

32
function* handleConnectWalletSuccess(action: ConnectWalletSuccessAction) {
33
  yield put(
×
34
    fetchNFTsRequest({
35
      vendor: VendorName.DECENTRALAND,
36
      view: View.ATLAS,
37
      params: {
38
        first: 1000,
39
        skip: 0,
40
        address: action.payload.wallet.address.toLowerCase()
41
      },
42
      filters: {
43
        isLand: true,
44
        rentalStatus: [RentalStatus.OPEN, RentalStatus.CANCELLED, RentalStatus.EXECUTED]
45
      }
46
    })
47
  )
48
}
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