<commit_before>import { combineReducers } from 'redux'

import transaction from './reducer/transaction'
import business, { loadBusinessList, updatePosition } from './reducer/business'
import navigation from './reducer/navigation'
import login from './reducer/login'
import sendMoney from './reducer/sendMoney'
import account from './reducer/account'
import networkConnection from './reducer/networkConnection'
import developerOptions from './reducer/developerOptions'

export const reducer = combineReducers({
  transaction,
  business,
  navigation,
  login,
  sendMoney,
  account,
  networkConnection,
  developerOptions,
})

const GEOLOCATION_SETTINGS = { enableHighAccuracy: true, timeout: 20000, maximumAge: 1000 }

export const initialise = (store) => {
  store.dispatch(loadBusinessList())
  navigator.geolocation.getCurrentPosition(
    (position) => store.dispatch(updatePosition(position)),
    () => alert('Cannot get location. Is GPS enabled?'),
    GEOLOCATION_SETTINGS
  )
  navigator.geolocation.watchPosition(
    (position) => store.dispatch(updatePosition(position)),
    () => alert('Cannot get location. Is GPS enabled?'),
    GEOLOCATION_SETTINGS
  )
}<commit_msg>fix geolocation<commit_after>import { combineReducers } from 'redux'

import transaction from './reducer/transaction'
import business, { loadBusinessList, updatePosition } from './reducer/business'
import navigation from './reducer/navigation'
import login from './reducer/login'
import sendMoney from './reducer/sendMoney'
import account from './reducer/account'
import networkConnection from './reducer/networkConnection'
import developerOptions from './reducer/developerOptions'

export const reducer = combineReducers({
  transaction,
  business,
  navigation,
  login,
  sendMoney,
  account,
  networkConnection,
  developerOptions,
})

export const initialise = (store) => {
  store.dispatch(loadBusinessList())
  navigator.geolocation.getCurrentPosition(
    (position) => store.dispatch(updatePosition(position)),
    () => alert('Cannot get location. Is GPS enabled?')
  )
  navigator.geolocation.watchPosition(
    (position) => store.dispatch(updatePosition(position)),
    () => alert('Cannot get location. Is GPS enabled?')
  )
}
{'fraction_non_alphanumeric': 0.11574697173620457, 'fraction_numerical': 0.004037685060565276, 'mean_word_length': 5.194444444444445, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4355096', 'n_tokens_mistral': 631, 'n_tokens_neox': 612, 'n_words': 157}