diff --git a/lib/reducers/entry-reducer.js b/lib/reducers/entry-reducer.js --- a/lib/reducers/entry-reducer.js +++ b/lib/reducers/entry-reducer.js @@ -45,7 +45,6 @@ import { stateSyncSpecs } from '../shared/state-sync/state-sync-specs.js'; import { threadInFilterList } from '../shared/thread-utils.js'; import { updateSpecs } from '../shared/updates/update-specs.js'; -import { isWebPlatform } from '../types/device-types.js'; import type { RawEntryInfo, EntryStore } from '../types/entry-types.js'; import type { BaseAction } from '../types/redux-types.js'; import { type ClientEntryInconsistencyReportCreationRequest } from '../types/report-types.js'; @@ -63,37 +62,10 @@ processUpdatesActionType, } from '../types/update-types.js'; import { authoritativeKeyserverID } from '../utils/authoritative-keyserver.js'; -import { getConfig } from '../utils/config.js'; import { dateString } from '../utils/date-utils.js'; -import { getMessageForException } from '../utils/errors.js'; -import { assertObjectsAreEqual, values } from '../utils/objects.js'; +import { values } from '../utils/objects.js'; import { relyingOnAuthoritativeKeyserver } from '../utils/services-utils.js'; -function assertEntryStoresAreEqual( - processedEntryStore: EntryStore, - expectedEntryStore: EntryStore, - location: string, - onStateDifference?: (message: string) => mixed, -) { - try { - assertObjectsAreEqual( - processedEntryStore, - expectedEntryStore, - `EntryStore - ${location}`, - ); - } catch (e) { - console.log( - 'Error processing EntryStore ops', - processedEntryStore, - expectedEntryStore, - ); - const message = `Error processing EntryStore ops ${ - getMessageForException(e) ?? '{no exception message}' - }`; - onStateDifference?.(message); - } -} - function daysToEntriesFromEntryInfos( entryInfos: $ReadOnlyArray, ): { [day: string]: string[] } { @@ -191,7 +163,6 @@ entryStore: EntryStore, action: BaseAction, newThreadInfos: RawThreadInfos, - onStateDifference?: (message: string) => mixed, ): { +entryStore: EntryStore, +entryStoreOperations: $ReadOnlyArray, @@ -722,14 +693,6 @@ daysToEntries: daysToEntriesFromEntryInfos(values(entryInfosFromDB)), lastUserInteractionCalendar, }; - if (!isWebPlatform(getConfig().platformDetails.platform)) { - assertEntryStoresAreEqual( - newStore, - entryStore, - action.type, - onStateDifference, - ); - } return { entryStore: newStore, entryStoreOperations: [], diff --git a/lib/reducers/master-reducer.js b/lib/reducers/master-reducer.js --- a/lib/reducers/master-reducer.js +++ b/lib/reducers/master-reducer.js @@ -58,12 +58,7 @@ entryStore, reportCreationRequests: newEntryInconsistencies, entryStoreOperations, - } = reduceEntryInfos( - state.entryStore, - action, - threadInfos, - onStateDifference, - ); + } = reduceEntryInfos(state.entryStore, action, threadInfos); const onStateDifferenceForStaff = (message: string) => { const isCurrentUserStaff = state.currentUserInfo?.id