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

decentraland / marketplace / 9665383386

25 Jun 2024 03:31PM UTC coverage: 66.486% (-0.1%) from 66.593%
9665383386

Pull #2264

github

meelrossi
remove locations saga
Pull Request #2264: feat: update decentraland-dapps v23.1.0

2602 of 5072 branches covered (51.3%)

Branch coverage included in aggregate %.

7593 of 10262 relevant lines covered (73.99%)

77.41 hits per line

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

47.06
/webapp/src/modules/proximity/sagas.ts
1
import { takeEvery, call, put } from 'redux-saga/effects'
30✔
2
import { t } from 'decentraland-dapps/dist/modules/translation/utils'
30✔
3
import { isErrorWithMessage } from '../../lib/error'
30✔
4
import { FETCH_TILES_SUCCESS, FetchTilesSuccessAction } from '../tile/actions'
30✔
5
import {
6
  FETCH_PROXIMITY_REQUEST,
7
  FetchProximityRequestAction,
8
  fetchProximitySuccess,
9
  fetchProximityFailure,
10
  fetchProximityRequest
11
} from './actions'
30✔
12
import { Proximity } from './types'
13

14
export function* proximitySaga() {
246✔
15
  yield takeEvery(FETCH_TILES_SUCCESS, handleFetchTilesSuccess)
246✔
16
  yield takeEvery(FETCH_PROXIMITY_REQUEST, handleFetchProximityRequest)
246✔
17
}
18

19
function* handleFetchProximityRequest(_action: FetchProximityRequestAction) {
20
  try {
×
21
    const proximity: Record<string, Proximity> = (yield call(async () => {
×
22
      const resp = await fetch(process.env.VITE_BASE_URL + '/proximity.json')
×
23
      return resp.json()
×
24
    })) as Record<string, Proximity>
25
    yield put(fetchProximitySuccess(proximity))
×
26
  } catch (error) {
27
    yield put(fetchProximityFailure(isErrorWithMessage(error) ? error.message : t('global.unknown_error')))
×
28
  }
29
}
30

31
function* handleFetchTilesSuccess(_action: FetchTilesSuccessAction) {
32
  yield put(fetchProximityRequest())
×
33
}
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