mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
92971d3c87
* Update eslint-plugin-import version * Convert JS files to use ESM * Update ESLint rules to check imports * Fix test:unit:global command env * Cleanup mock-dev script
18 lines
433 B
JavaScript
18 lines
433 B
JavaScript
import extend from 'xtend'
|
|
import { actionConstants } from '../../store/actions'
|
|
|
|
export default reduceMetamask
|
|
|
|
function reduceMetamask (state, action) {
|
|
const localeMessagesState = extend({}, state.localeMessages)
|
|
|
|
switch (action.type) {
|
|
case actionConstants.SET_CURRENT_LOCALE:
|
|
return extend(localeMessagesState, {
|
|
current: action.value.messages,
|
|
})
|
|
default:
|
|
return localeMessagesState
|
|
}
|
|
}
|