mirror of
https://github.com/status-im/liquid-funding.git
synced 2025-01-12 04:24:23 +00:00
11 lines
310 B
JavaScript
11 lines
310 B
JavaScript
import { evolve, map, when, propEq, set, lensProp } from 'ramda'
|
|
|
|
export const cancelProfile = (state, id) => {
|
|
const updateMatch = when(
|
|
propEq('idProfile', id),
|
|
set(lensProp('canceled'), true)
|
|
)
|
|
const transformation = { fundProfiles: map(updateMatch) }
|
|
return evolve(transformation, state)
|
|
}
|