@@ -53,61 +53,3 @@ export function makeEnvelop(
53
53
54
54
export const sign = async ( data : string ) => sha256 ( data ) ;
55
55
export const testEnvelop = makeEnvelop ( 'from1' , 'to1' , 'message' , Date . now ( ) ) ;
56
-
57
- const storageEnvelopContainer = {
58
- envelop : testEnvelop ,
59
- messageState : MessageState . Created ,
60
- } ;
61
-
62
- export const db : Db = {
63
- accountEnsName : 'test.dm3.eth' ,
64
- updateLocalStorageOnRemoteRead : async < T extends Chunk > (
65
- key : string ,
66
- value : T ,
67
- ) => { } ,
68
- keyValueStoreLocal : {
69
- read : async < T > ( key : string ) => {
70
- switch ( key ) {
71
- // AccountManifest
72
- case await getAccountManifestKey ( db ) :
73
- const accountManifest : AccountManifest = {
74
- conversationListCounter : 101 ,
75
- key,
76
- } ;
77
-
78
- return accountManifest as T ;
79
-
80
- // ConversationList page 0
81
- case await getConversationListKey ( db , 1 ) :
82
- const conversationList : ConversationList = {
83
- conversationList : [ 'c1' ] ,
84
- key,
85
- } ;
86
- return conversationList as T ;
87
-
88
- // ConversationManifest for test.dm3.eth and alice.eth
89
- case await getConversationManifestKey ( db , 'alice.eth' ) :
90
- const conversationManifest : ConversationManifest = {
91
- key,
92
- isHidden : false ,
93
- messageCounter : 101 ,
94
- } ;
95
- return conversationManifest as T ;
96
-
97
- // MessageChunk page 1 for test.dm3.eth and alice.eth
98
- case await getMessageChunkKey ( db , 'alice.eth' , 1 ) :
99
- const messageChunk : MessageChunk = {
100
- envelopContainer : [ storageEnvelopContainer ] ,
101
- key,
102
- } ;
103
- return messageChunk as T ;
104
-
105
- default :
106
- return undefined ;
107
- }
108
- } ,
109
- write : async ( key : string ) => { } ,
110
- } ,
111
- sign,
112
- readStrategy : ReadStrategy . LocalFirst ,
113
- } ;
0 commit comments