Skip to content

Commit

Permalink
feat: adjust storage data model
Browse files Browse the repository at this point in the history
  • Loading branch information
jinoosss committed Nov 3, 2024
1 parent 0762fdc commit 74d5c26
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ export type AccountGRC721CollectionsV007 = {
packagePath: string;
name: string;
symbol: string;
image: string | null;
isTokenUri: boolean;
isMetadata: boolean;
};
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { StorageMigrator } from './storage-migrator';
import { StorageModelV001 } from './migrations/v001/storage-model-v001';
import { StorageMigrator } from './storage-migrator';

const mockStorageV001: StorageModelV001 = {
version: 1,
Expand Down Expand Up @@ -67,7 +67,7 @@ describe('StorageMigrator', () => {
const migrated = await migrator.migrate(current);

expect(migrated).not.toBeNull();
expect(migrated?.version).toBe(6);
expect(migrated?.version).toBe(7);
expect(migrated?.data).not.toBeNull();
expect(migrated?.data.NETWORKS).toHaveLength(3);
expect(migrated?.data.CURRENT_CHAIN_ID).toBe('');
Expand All @@ -89,7 +89,7 @@ describe('StorageMigrator', () => {
const migrated = await migrator.migrate(current);

expect(migrated).not.toBeNull();
expect(migrated?.version).toBe(6);
expect(migrated?.version).toBe(7);
expect(migrated?.data).not.toBeNull();
expect(migrated?.data.SERIALIZED).not.toBe('');
expect(migrated?.data.ADDRESS_BOOK).toBe('');
Expand Down

0 comments on commit 74d5c26

Please sign in to comment.