From affd3d6372d06e5e2cdc8288280ebaabb7a64b9f Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Fri, 24 Feb 2023 16:00:20 +1100 Subject: [PATCH] chore: use pascal case for class name --- packages/core/src/lib/filter/filter_rpc.ts | 12 ++++++------ packages/core/src/lib/filter/index.ts | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/core/src/lib/filter/filter_rpc.ts b/packages/core/src/lib/filter/filter_rpc.ts index 4bf7345c18..cd6e6b9ccb 100644 --- a/packages/core/src/lib/filter/filter_rpc.ts +++ b/packages/core/src/lib/filter/filter_rpc.ts @@ -8,7 +8,7 @@ export type ContentFilter = { /** * FilterRPC represents a message conforming to the Waku Filter protocol */ -export class FilterRPC { +export class FilterRpc { public constructor(public proto: proto.FilterRpc) {} static createRequest( @@ -16,8 +16,8 @@ export class FilterRPC { contentFilters: ContentFilter[], requestId?: string, subscribe = true - ): FilterRPC { - return new FilterRPC({ + ): FilterRpc { + return new FilterRpc({ requestId: requestId || uuid(), request: { subscribe, @@ -31,11 +31,11 @@ export class FilterRPC { /** * * @param bytes Uint8Array of bytes from a FilterRPC message - * @returns FilterRPC + * @returns FilterRpc */ - static decode(bytes: Uint8Array): FilterRPC { + static decode(bytes: Uint8Array): FilterRpc { const res = proto.FilterRpc.decode(bytes); - return new FilterRPC(res); + return new FilterRpc(res); } /** diff --git a/packages/core/src/lib/filter/index.ts b/packages/core/src/lib/filter/index.ts index 31f66e8f5b..b147a8cebc 100644 --- a/packages/core/src/lib/filter/index.ts +++ b/packages/core/src/lib/filter/index.ts @@ -29,7 +29,7 @@ import { DefaultPubSubTopic } from "../constants.js"; import { groupByContentTopic } from "../group_by.js"; import { toProtoMessage } from "../to_proto_message.js"; -import { ContentFilter, FilterRPC } from "./filter_rpc.js"; +import { ContentFilter, FilterRpc } from "./filter_rpc.js"; export { ContentFilter }; @@ -84,7 +84,7 @@ class Filter implements IFilter { const contentFilters = contentTopics.map((contentTopic) => ({ contentTopic, })); - const request = FilterRPC.createRequest( + const request = FilterRpc.createRequest( pubSubTopic, contentFilters, undefined, @@ -141,7 +141,7 @@ class Filter implements IFilter { try { pipe(streamData.stream, lp.decode(), async (source) => { for await (const bytes of source) { - const res = FilterRPC.decode(bytes.slice()); + const res = FilterRpc.decode(bytes.slice()); if (res.requestId && res.push?.messages?.length) { await this.pushMessages(res.requestId, res.push.messages); } @@ -241,7 +241,7 @@ class Filter implements IFilter { requestId: string, peer: Peer ): Promise { - const unsubscribeRequest = FilterRPC.createRequest( + const unsubscribeRequest = FilterRpc.createRequest( topic, contentFilters, requestId,