From 354dcd66a53cd303e30176bb5ae82917befce12b Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Fri, 2 Jul 2021 13:52:50 +1000 Subject: [PATCH] Constructor is more appropriate when comparing function signatures --- src/lib/waku_relay/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/waku_relay/index.ts b/src/lib/waku_relay/index.ts index f5d5266d0e..784935e918 100644 --- a/src/lib/waku_relay/index.ts +++ b/src/lib/waku_relay/index.ts @@ -114,7 +114,7 @@ export class WakuRelay extends Gossipsub { */ public async send(message: WakuMessage): Promise { const msg = message.encode(); - await super.publish(this.pubsubTopic, Buffer.from(msg)); + await super.publish(this.pubsubTopic, new Buffer(msg)); } /**