diff --git a/packages/status-js/src/groupChats.ts b/packages/status-js/src/groupChats.ts index a5a015ef..014ae5b9 100644 --- a/packages/status-js/src/groupChats.ts +++ b/packages/status-js/src/groupChats.ts @@ -1,5 +1,4 @@ -import { WakuMessage } from 'js-waku' -import { DecryptionMethod } from 'js-waku/build/main/lib/waku_message' +import { waku_message, WakuMessage } from 'js-waku' import { ChatMessage } from '.' import { createSymKeyFromPassword } from './encryption' @@ -260,7 +259,7 @@ export class GroupChats { chat.members.map(async member => { if (!removeObserver) { this.waku.relay.addDecryptionKey(member.symKey, { - method: DecryptionMethod.Symmetric, + method: waku_message.DecryptionMethod.Symmetric, contentTopics: [member.topic], }) } diff --git a/packages/status-js/src/messenger.spec.ts b/packages/status-js/src/messenger.spec.ts index 7f5e2fa9..bc607231 100644 --- a/packages/status-js/src/messenger.spec.ts +++ b/packages/status-js/src/messenger.spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai' import debug from 'debug' -import { Protocols } from 'js-waku/build/main/lib/waku' +import { Protocols } from 'js-waku' import { Community } from './community' import { Identity } from './identity' diff --git a/packages/status-js/src/messenger.ts b/packages/status-js/src/messenger.ts index 151f8588..319b672d 100644 --- a/packages/status-js/src/messenger.ts +++ b/packages/status-js/src/messenger.ts @@ -1,6 +1,5 @@ import debug from 'debug' -import { Waku, WakuMessage } from 'js-waku' -import { DecryptionMethod } from 'js-waku/build/main/lib/waku_message' +import { Waku, waku_message, WakuMessage } from 'js-waku' import { Chat } from './chat' import { ApplicationMetadataMessage_Type } from './proto/status/v1/application_metadata_message' @@ -10,7 +9,7 @@ import { ChatMessage } from './wire/chat_message' import type { Identity } from './identity' import type { Content } from './wire/chat_message' -import type { CreateOptions as WakuCreateOptions } from 'js-waku/build/main/lib/waku' +import type { waku } from 'js-waku' const dbg = debug('communities:messenger') @@ -37,7 +36,7 @@ export class Messenger { public static async create( identity: Identity | undefined, - wakuOptions?: WakuCreateOptions + wakuOptions?: waku.CreateOptions ): Promise { const _wakuOptions = Object.assign( { bootstrap: { default: true } }, @@ -83,7 +82,7 @@ export class Messenger { throw `Failed to join chat, it is already joined: ${chat.id}` this.waku.addDecryptionKey(chat.symKey, { - method: DecryptionMethod.Symmetric, + method: waku_message.DecryptionMethod.Symmetric, contentTopics: [chat.contentTopic], })