mirror of
https://github.com/status-im/safe-react.git
synced 2025-02-26 16:30:34 +00:00
WA-230 Adding balances reducer
This commit is contained in:
parent
c2f00976c6
commit
92b881fc5e
13
src/routes/safe/store/reducer/balances.js
Normal file
13
src/routes/safe/store/reducer/balances.js
Normal file
@ -0,0 +1,13 @@
|
||||
// @flow
|
||||
import { Map } from 'immutable'
|
||||
import { handleActions, type ActionType } from 'redux-actions'
|
||||
import addBalance, { ADD_BALANCE } from '~/routes/safe/store/actions/addBalance'
|
||||
|
||||
export const BALANCE_REDUCER_ID = 'balances'
|
||||
|
||||
export type State = Map<string, string>
|
||||
|
||||
export default handleActions({
|
||||
[ADD_BALANCE]: (state: State, action: ActionType<typeof addBalance>): State =>
|
||||
state.set(action.payload.safeAddress, action.payload.funds),
|
||||
}, Map())
|
Loading…
x
Reference in New Issue
Block a user