Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.

Commit 20825eb

Browse files
committed
fix(encryption): Give GroupKey same interface as protocol's EncryptedGroupKey.
Fixes streamr-client-testing subscriber.js.
1 parent ce637a5 commit 20825eb

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/stream/Encryption.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,14 @@ class GroupKey {
135135
return this.id
136136
}
137137

138+
toArray() {
139+
return [this.id, this.hex]
140+
}
141+
142+
serialize() {
143+
return JSON.stringify(this.toArray())
144+
}
145+
138146
static generate(id = uuid('GroupKey')) {
139147
const keyBytes = crypto.randomBytes(32)
140148
return new GroupKey(id, keyBytes)

src/subscribe/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,6 @@ class Subscriptions {
418418
const sub = new Subscription(this.client, {
419419
...options,
420420
validate: subSession.validate,
421-
// @ts-expect-error
422421
}, async (err: Todo) => {
423422
try {
424423
await this.remove(sub)

0 commit comments

Comments
 (0)