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

decentraland / marketplace / 8194016372

07 Mar 2024 07:54PM UTC coverage: 66.152% (-0.09%) from 66.242%
8194016372

Pull #2167

github

LautaroPetaccio
fix: Add toasts
Pull Request #2167: feat: Use new cross chain transaction payload action

2507 of 4904 branches covered (51.12%)

Branch coverage included in aggregate %.

8 of 13 new or added lines in 6 files covered. (61.54%)

6 existing lines in 5 files now uncovered.

7601 of 10376 relevant lines covered (73.26%)

70.55 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 {
6
  FETCH_TILES_REQUEST,
7
  FetchTilesRequestAction,
8
  fetchTilesSuccess,
9
  fetchTilesFailure
10
} from './actions'
28✔
11
import {
12
  ConnectWalletSuccessAction,
13
  CONNECT_WALLET_SUCCESS
14
} from 'decentraland-dapps/dist/modules/wallet/actions'
28✔
15
import { t } from 'decentraland-dapps/dist/modules/translation/utils'
28✔
16
import { isErrorWithMessage } from '../../lib/error'
28✔
17
import { fetchNFTsRequest } from '../nft/actions'
28✔
18
import { VendorName } from '../vendor'
28✔
19
import { View } from '../ui/types'
28✔
20
import { AtlasTile } from 'decentraland-ui'
21

22
export function* tileSaga() {
237✔
23
  yield takeEvery(FETCH_TILES_REQUEST, handleFetchTilesRequest)
237✔
24
  yield takeEvery(CONNECT_WALLET_SUCCESS, handleConnectWalletSuccess)
237✔
25
}
26

27
function* handleFetchTilesRequest(_action: FetchTilesRequestAction) {
28
  try {
237✔
29
    const response: AxiosResponse<{
30
      data: Record<string, AtlasTile>
31
    }> = yield call(atlasAPI.fetchTiles)
237✔
32
    const tiles = response.data.data
×
33
    const lastModified = response.headers['last-modified']
×
34
    yield put(fetchTilesSuccess(tiles, new Date(lastModified)))
×
35
  } catch (error) {
UNCOV
36
    yield put(
×
37
      fetchTilesFailure(
38
        isErrorWithMessage(error) ? error.message : t('global.unknown_error')
×
39
      )
40
    )
41
  }
42
}
43

44
function* handleConnectWalletSuccess(action: ConnectWalletSuccessAction) {
45
  yield put(
×
46
    fetchNFTsRequest({
47
      vendor: VendorName.DECENTRALAND,
48
      view: View.ATLAS,
49
      params: {
50
        first: 1000,
51
        skip: 0,
52
        address: action.payload.wallet.address.toLowerCase()
53
      },
54
      filters: {
55
        isLand: true,
56
        rentalStatus: [
57
          RentalStatus.OPEN,
58
          RentalStatus.CANCELLED,
59
          RentalStatus.EXECUTED
60
        ]
61
      }
62
    })
63
  )
64
}
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