diff --git a/src/routes/safe/store/reducer/safe.js b/src/routes/safe/store/reducer/safe.js index d430c49d..f8f64485 100644 --- a/src/routes/safe/store/reducer/safe.js +++ b/src/routes/safe/store/reducer/safe.js @@ -7,6 +7,7 @@ import { makeOwner } from '~/routes/safe/store/model/owner' import { type Safe, makeSafe } from '~/routes/safe/store/model/safe' import { load, saveSafes, SAFES_KEY } from '~/utils/localStorage' import { makeDailyLimit } from '~/routes/safe/store/model/dailyLimit' +import updateThreshold, { UPDATE_THRESHOLD } from '~/routes/safe/store/actions/updateThreshold' export const SAFE_REDUCER_ID = 'safes' @@ -50,4 +51,6 @@ export default handleActions({ }, [UPDATE_DAILY_LIMIT]: (state: State, action: ActionType): State => state.updateIn([action.payload.safeAddress, 'dailyLimit'], () => makeDailyLimit(action.payload.dailyLimit)), + [UPDATE_THRESHOLD]: (state: State, action: ActionType): State => + state.updateIn([action.payload.safeAddress, 'confirmations'], () => action.payload.threshold), }, Map()) diff --git a/src/routes/safe/store/test/safe.spec.js b/src/routes/safe/store/test/safe.spec.js index 3c431b4b..8a0ebd4d 100644 --- a/src/routes/safe/store/test/safe.spec.js +++ b/src/routes/safe/store/test/safe.spec.js @@ -2,6 +2,7 @@ import balanceReducerTests from './balance.reducer' import safeReducerTests from './safe.reducer' import dailyLimitReducerTests from './dailyLimit.reducer' +import thresholdReducerTests from './threshold.reducer' import balanceSelectorTests from './balance.selector' import safeSelectorTests from './safe.selector' import grantedSelectorTests from './granted.selector' @@ -13,6 +14,7 @@ describe('Safe Test suite', () => { safeReducerTests() balanceReducerTests() dailyLimitReducerTests() + thresholdReducerTests() // SAFE SELECTOR safeSelectorTests()