From 6a17cc3646d66435bc27075ac34ce3622b578f68 Mon Sep 17 00:00:00 2001 From: danisharora099 Date: Thu, 17 Aug 2023 17:15:08 +0530 Subject: [PATCH] fix eslint error --- packages/core/src/lib/filter/index.ts | 2 +- packages/core/src/lib/light_push/index.ts | 12 ++++++------ packages/relay/src/index.ts | 4 ++-- packages/sdk/src/create.ts | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/core/src/lib/filter/index.ts b/packages/core/src/lib/filter/index.ts index 852ec22684..792810a2b1 100644 --- a/packages/core/src/lib/filter/index.ts +++ b/packages/core/src/lib/filter/index.ts @@ -38,7 +38,7 @@ const log = debug("waku:filter:v2"); const FilterCodec = { SUBSCRIBE: "/vac/waku/filter-subscribe/2.0.0-beta1", - PUSH: "/vac/waku/filter-push/2.0.0-beta1", + PUSH: "/vac/waku/filter-push/2.0.0-beta1" }; type SubscriptionCallback = { diff --git a/packages/core/src/lib/light_push/index.ts b/packages/core/src/lib/light_push/index.ts index 0781d1e3b3..e3c6d2da5c 100644 --- a/packages/core/src/lib/light_push/index.ts +++ b/packages/core/src/lib/light_push/index.ts @@ -52,7 +52,7 @@ class LightPush extends BaseProtocol implements ILightPush { log("Failed to send waku light push: message is bigger than 1MB"); return { recipients, - errors: [SendError.SIZE_TOO_BIG], + errors: [SendError.SIZE_TOO_BIG] }; } @@ -61,7 +61,7 @@ class LightPush extends BaseProtocol implements ILightPush { log("Failed to encode to protoMessage, aborting push"); return { recipients, - errors: [SendError.ENCODE_FAILED], + errors: [SendError.ENCODE_FAILED] }; } @@ -73,14 +73,14 @@ class LightPush extends BaseProtocol implements ILightPush { let error: SendError | undefined; const stream = await this.newStream(peer); - + try { const res = await pipe( [query.encode()], lp.encode, stream, lp.decode, - async (source) => await all(source), + async (source) => await all(source) ); try { const bytes = new Uint8ArrayList(); @@ -111,7 +111,7 @@ class LightPush extends BaseProtocol implements ILightPush { const results = await Promise.allSettled(promises); const successfulResults = results.filter( - (result) => result.status === "fulfilled", + (result) => result.status === "fulfilled" ) as PromiseFulfilledResult<{ recipients: PeerId[]; error: SendError | undefined; @@ -123,7 +123,7 @@ class LightPush extends BaseProtocol implements ILightPush { return { recipients, - errors, + errors }; } } diff --git a/packages/relay/src/index.ts b/packages/relay/src/index.ts index 045f71ac00..372a3274e5 100644 --- a/packages/relay/src/index.ts +++ b/packages/relay/src/index.ts @@ -105,7 +105,7 @@ class Relay implements IRelay { log("Failed to send waku relay: message is bigger that 1MB"); return { recipients, - errors: [SendError.SIZE_TOO_BIG], + errors: [SendError.SIZE_TOO_BIG] }; } @@ -114,7 +114,7 @@ class Relay implements IRelay { log("Failed to encode message, aborting publish"); return { recipients, - errors: [SendError.ENCODE_FAILED], + errors: [SendError.ENCODE_FAILED] }; } diff --git a/packages/sdk/src/create.ts b/packages/sdk/src/create.ts index 2963951682..0b78fd39fc 100644 --- a/packages/sdk/src/create.ts +++ b/packages/sdk/src/create.ts @@ -150,7 +150,7 @@ export function defaultPeerDiscoveries(): (( ) => PeerDiscovery)[] { const discoveries = [ wakuDnsDiscovery([enrTree["PROD"]], DEFAULT_NODE_REQUIREMENTS), - wakuPeerExchangeDiscovery(), + wakuPeerExchangeDiscovery() ]; return discoveries; }