From 74d5c2615fd360f9c9a84c6e8669de1625ac25c7 Mon Sep 17 00:00:00 2001 From: jinoosss Date: Sun, 3 Nov 2024 21:29:20 +0900 Subject: [PATCH] feat: adjust storage data model --- .../src/migrates/migrations/v007/storage-model-v007.ts | 3 +++ .../adena-extension/src/migrates/storage-migrator.spec.ts | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/adena-extension/src/migrates/migrations/v007/storage-model-v007.ts b/packages/adena-extension/src/migrates/migrations/v007/storage-model-v007.ts index edfc1788..1aa879b3 100644 --- a/packages/adena-extension/src/migrates/migrations/v007/storage-model-v007.ts +++ b/packages/adena-extension/src/migrates/migrations/v007/storage-model-v007.ts @@ -129,6 +129,9 @@ export type AccountGRC721CollectionsV007 = { packagePath: string; name: string; symbol: string; + image: string | null; + isTokenUri: boolean; + isMetadata: boolean; }; }; diff --git a/packages/adena-extension/src/migrates/storage-migrator.spec.ts b/packages/adena-extension/src/migrates/storage-migrator.spec.ts index 83668561..540d751e 100644 --- a/packages/adena-extension/src/migrates/storage-migrator.spec.ts +++ b/packages/adena-extension/src/migrates/storage-migrator.spec.ts @@ -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, @@ -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(''); @@ -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('');