From 3a4e98e184b6436bc85283cd4b6d8faf2a60a4c7 Mon Sep 17 00:00:00 2001 From: Franck R Date: Thu, 17 Feb 2022 13:23:39 +1100 Subject: [PATCH] Remove unnecessary use of Buffer (#548) --- src/lib/waku.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/lib/waku.ts b/src/lib/waku.ts index e6717acfb8..248ac0df8a 100644 --- a/src/lib/waku.ts +++ b/src/lib/waku.ts @@ -180,15 +180,11 @@ export class Waku { options?.libp2p?.modules ); - const staticNoiseKey = options?.staticNoiseKey - ? Buffer.from(options?.staticNoiseKey) - : undefined; - // streamMuxer, connection encryption and pubsub are overridden // as those are the only ones currently supported by Waku nodes. libp2pOpts.modules = Object.assign(libp2pOpts.modules, { streamMuxer: [Mplex], - connEncryption: [new Noise(staticNoiseKey)], + connEncryption: [new Noise(options?.staticNoiseKey)], pubsub: WakuRelay, });