Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: redux-persist error spew #7824

Merged
merged 5 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions src/state/migrations/index.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
import type { MigrationManifest } from 'redux-persist'

import { clearAssets } from './clearAssets'
import { clearMarketData } from './clearMarketData'
import { clearNfts } from './clearNfts'
import { clearOpportunities } from './clearOpportunities'
import { clearPortfolio } from './clearPortfolio'
import { clearSnapshot } from './clearSnapshot'
import { clearTxHistory } from './clearTxHistory'

export const clearTxHistoryMigrations = {
// Uncomment me when introducing the first migration for this slice
// 0: clearTxHistory,
0: clearTxHistory,
} as unknown as Omit<MigrationManifest, '_persist'>

export const clearOpportunitiesMigrations = {
// Uncomment me when introducing the first migration for this slice
// 0: clearOpportunities,
0: clearOpportunities,
} as unknown as Omit<MigrationManifest, '_persist'>

export const clearPortfolioMigrations = {
// Uncomment me when introducing the first migration for this slice
// 0: clearPortfolio,
0: clearPortfolio,
} as unknown as Omit<MigrationManifest, '_persist'>

export const clearNftsMigrations = {
// Uncomment me when introducing the first migration for this slice
// 0: clearNfts,
0: clearNfts,
} as unknown as Omit<MigrationManifest, '_persist'>

export const clearAssetsMigrations = {
Expand All @@ -28,11 +30,9 @@ export const clearAssetsMigrations = {
} as unknown as Omit<MigrationManifest, '_persist'>

export const clearMarketDataMigrations = {
// Uncomment me when introducing the first migration for this slice
// 0: clearMarketData,
0: clearMarketData,
} as unknown as Omit<MigrationManifest, '_persist'>

export const clearSnapshotMigrations = {
// Uncomment me when introducing the first migration for this slice
// 0: clearSnapshot,
0: clearSnapshot,
} as unknown as Omit<MigrationManifest, '_persist'>
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('opportunitiesSlice', () => {
...initialState,
_persist: {
rehydrated: true,
version: -Infinity,
version: 0,
},
})
})
Expand Down
2 changes: 1 addition & 1 deletion src/state/slices/txHistorySlice/txHistorySlice.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('txHistorySlice', () => {
expect(store.getState().txHistory).toEqual({
_persist: {
rehydrated: true,
version: -Infinity,
version: 0,
},
hydrationMeta: {},
txs: {
Expand Down
Loading