2020-01-09 04:34:58 +01:00
|
|
|
import { actionConstants } from '../../store/actions'
|
2018-03-16 01:29:45 +01:00
|
|
|
|
2020-01-09 04:34:58 +01:00
|
|
|
export default reduceMetamask
|
2018-03-16 01:29:45 +01:00
|
|
|
|
|
|
|
function reduceMetamask (state, action) {
|
2020-01-13 17:29:21 +01:00
|
|
|
const localeMessagesState = { ...state.localeMessages }
|
2018-03-16 01:29:45 +01:00
|
|
|
|
|
|
|
switch (action.type) {
|
2020-01-09 04:34:58 +01:00
|
|
|
case actionConstants.SET_CURRENT_LOCALE:
|
2020-01-13 17:29:21 +01:00
|
|
|
return {
|
|
|
|
...localeMessagesState,
|
2019-09-06 15:47:07 +02:00
|
|
|
current: action.value.messages,
|
2020-01-13 17:29:21 +01:00
|
|
|
}
|
2018-03-16 01:29:45 +01:00
|
|
|
default:
|
|
|
|
return localeMessagesState
|
|
|
|
}
|
|
|
|
}
|