Update safe tokens wip
This commit is contained in:
parent
49f000447c
commit
f8d1e6801e
|
@ -14,6 +14,7 @@ type ActionReturn = {
|
|||
export const updateTokenAction = createAction<string, Function, ActionReturn>(
|
||||
UPDATE_SAFE_TOKENS,
|
||||
(token: SafeToken): ActionReturn => ({
|
||||
safeAddress,
|
||||
token,
|
||||
}),
|
||||
)
|
||||
|
@ -23,7 +24,7 @@ const updateActiveTokens = (safeAddress: string, tokenAddress: string) => async
|
|||
) => {
|
||||
const token: SafeToken = SafeTokenRecord({ address: tokenAddress })
|
||||
|
||||
dispatch(updateTokenAction(token))
|
||||
dispatch(updateTokenAction(safeAddress, token))
|
||||
}
|
||||
|
||||
export default updateActiveTokens
|
||||
|
|
|
@ -7,6 +7,7 @@ import { type OwnerProps } from '~/routes/safe/store/models/owner'
|
|||
import { loadFromStorage } from '~/utils/storage'
|
||||
import { SAFES_KEY } from '~/logic/safe/utils'
|
||||
import { UPDATE_SAFE } from '~/routes/safe/store/actions/updateSafe'
|
||||
import { UPDATE_SAFE_TOKENS } from '~/routes/safe/store/actions/updateActiveTokens'
|
||||
|
||||
export const SAFE_REDUCER_ID = 'safes'
|
||||
|
||||
|
@ -66,6 +67,7 @@ export default handleActions<State, *>(
|
|||
|
||||
return state.set(safe.address, safe)
|
||||
},
|
||||
[UPDATE_SAFE_TOKENS]: (state: State, action: ActionType<Function>):
|
||||
},
|
||||
Map(),
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue