issue: https://linear.app/comm/issue/ENG-4460/refactor-connection-field
We have code inside of reduceConnectionInfo that reduces connection field on rehydrateActionType action. It returns the default connection with the exception of actualizedCalendarQuery field, that we want to get rehydrated. Redux is implemented in such a way, that if the state returned after the rehydrate action is dispatched is not the rehydrated state, the rehydrated state is ignored. see source code for details: https://github.com/rt2zz/reduxpersist/blob/master/src/stateReconciler/autoMergeLevel1.ts#L23 https://github.com/rt2zz/redux-persist/blob/master/src/persistReducer.ts#L170.
This wasn't causing problems before, but we want to move connection field to keyserverStore. So changing the connection on rehydrate action causes the rest of keyserverStore to not get rehydrated.
Moreover, there is no point in having actualizedCalendarQuery inside of the keyserverStore - the query will be the same for all keyservers. There isn't even really a good reason why actualizedCalendarQuery was in the connection field in the first place, from what I can tell. It can be reduced completly independantly, and their use cases are quite different. So I'm moving actualizedCalendarQuery out of connection, and in next diffs I will
- Stop reducing connection on rehydrate action and instead remove it from persistence
- put the connection field inside of keyserverStore.