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

Commit 411d79d

Browse files
committed
style: Linting.
1 parent 098dc21 commit 411d79d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/stream/encryption/Encryption.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ class EncryptionUtilBase {
238238
// These overrides tell ts outputInHex returns string
239239
static encryptWithPublicKey(plaintextBuffer: Uint8Array, publicKey: crypto.KeyLike): string
240240
static encryptWithPublicKey(plaintextBuffer: Uint8Array, publicKey: crypto.KeyLike, outputInHex: false): Buffer
241-
static encryptWithPublicKey(plaintextBuffer: Uint8Array, publicKey: crypto.KeyLike, outputInHex: boolean = false) {
241+
static encryptWithPublicKey(plaintextBuffer: Uint8Array, publicKey: crypto.KeyLike, outputInHex = false) {
242242
this.validatePublicKey(publicKey)
243243
const ciphertextBuffer = crypto.publicEncrypt(publicKey, plaintextBuffer)
244244
if (outputInHex) {

src/stream/encryption/KeyExchangeSubscriber.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ async function SubscriberKeyExhangeSubscription(
5454
getGroupKeyStore: (streamId: string) => Promise<GroupKeyStore>,
5555
encryptionUtil: EncryptionUtil
5656
) {
57-
let sub: Subscription
5857
async function onKeyExchangeMessage(_parsedContent: any, streamMessage: StreamMessage) {
5958
try {
6059
const { messageType } = streamMessage
@@ -73,7 +72,7 @@ async function SubscriberKeyExhangeSubscription(
7372
}
7473
}
7574

76-
sub = await subscribeToKeyExchangeStream(client, onKeyExchangeMessage)
75+
const sub = await subscribeToKeyExchangeStream(client, onKeyExchangeMessage)
7776
sub.on('error', () => {}) // errors should not shut down subscription
7877
return sub
7978
}

0 commit comments

Comments
 (0)