This repository was archived by the owner on Dec 21, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -238,7 +238,7 @@ class EncryptionUtilBase {
238
238
// These overrides tell ts outputInHex returns string
239
239
static encryptWithPublicKey ( plaintextBuffer : Uint8Array , publicKey : crypto . KeyLike ) : string
240
240
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 ) {
242
242
this . validatePublicKey ( publicKey )
243
243
const ciphertextBuffer = crypto . publicEncrypt ( publicKey , plaintextBuffer )
244
244
if ( outputInHex ) {
Original file line number Diff line number Diff line change @@ -54,7 +54,6 @@ async function SubscriberKeyExhangeSubscription(
54
54
getGroupKeyStore : ( streamId : string ) => Promise < GroupKeyStore > ,
55
55
encryptionUtil : EncryptionUtil
56
56
) {
57
- let sub : Subscription
58
57
async function onKeyExchangeMessage ( _parsedContent : any , streamMessage : StreamMessage ) {
59
58
try {
60
59
const { messageType } = streamMessage
@@ -73,7 +72,7 @@ async function SubscriberKeyExhangeSubscription(
73
72
}
74
73
}
75
74
76
- sub = await subscribeToKeyExchangeStream ( client , onKeyExchangeMessage )
75
+ const sub = await subscribeToKeyExchangeStream ( client , onKeyExchangeMessage )
77
76
sub . on ( 'error' , ( ) => { } ) // errors should not shut down subscription
78
77
return sub
79
78
}
You can’t perform that action at this time.
0 commit comments