diff --git a/lib/reducers/keyserver-reducer.js b/lib/reducers/keyserver-reducer.js --- a/lib/reducers/keyserver-reducer.js +++ b/lib/reducers/keyserver-reducer.js @@ -24,6 +24,7 @@ import { keyserverStoreOpsHandlers, type ReplaceKeyserverOperation, + type RemoveKeyserversOperation, } from '../ops/keyserver-store-ops.js'; import { queueActivityUpdatesActionType } from '../types/activity-types.js'; import type { KeyserverInfos, KeyserverStore } from '../types/keyserver-types'; @@ -64,12 +65,16 @@ keyserverInfos: processStoreOps(state.keyserverInfos, [replaceOperation]), }; } else if (action.type === removeKeyserverActionType) { - const { [action.payload.keyserverAdminUserID]: _, ...rest } = - state.keyserverInfos; + const removeOperation: RemoveKeyserversOperation = { + type: 'remove_keyservers', + payload: { + ids: [action.payload.keyserverAdminUserID], + }, + }; return { ...state, - keyserverInfos: rest, + keyserverInfos: processStoreOps(state.keyserverInfos, [removeOperation]), }; } else if (action.type === resetUserStateActionType) { // this action is only dispatched on native