From 357f9ca4a4eb3f558adf9c26bc27e7a1ef7472a1 Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Sat, 25 Feb 2023 00:01:31 +1100 Subject: [PATCH] chore: use pascal case for class name --- packages/core/src/lib/store/history_rpc.ts | 10 +++++----- packages/core/src/lib/store/index.ts | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/core/src/lib/store/history_rpc.ts b/packages/core/src/lib/store/history_rpc.ts index 56dfbf8ede..c274e6cb9b 100644 --- a/packages/core/src/lib/store/history_rpc.ts +++ b/packages/core/src/lib/store/history_rpc.ts @@ -19,7 +19,7 @@ export interface Params { cursor?: proto.Index; } -export class HistoryRPC { +export class HistoryRpc { private constructor(public readonly proto: proto.HistoryRpc) {} get query(): proto.HistoryQuery | undefined { @@ -33,7 +33,7 @@ export class HistoryRPC { /** * Create History Query. */ - static createQuery(params: Params): HistoryRPC { + static createQuery(params: Params): HistoryRpc { const contentFilters = params.contentTopics.map((contentTopic) => { return { contentTopic }; }); @@ -56,7 +56,7 @@ export class HistoryRPC { // milliseconds 10^-3 to nanoseconds 10^-9 endTime = BigInt(params.endTime.valueOf()) * OneMillion; } - return new HistoryRPC({ + return new HistoryRpc({ requestId: uuid(), query: { pubsubTopic: params.pubSubTopic, @@ -69,9 +69,9 @@ export class HistoryRPC { }); } - decode(bytes: Uint8ArrayList): HistoryRPC { + decode(bytes: Uint8ArrayList): HistoryRpc { const res = proto.HistoryRpc.decode(bytes); - return new HistoryRPC(res); + return new HistoryRpc(res); } encode(): Uint8Array { diff --git a/packages/core/src/lib/store/index.ts b/packages/core/src/lib/store/index.ts index 6b0dc3b7d3..464bebc7e2 100644 --- a/packages/core/src/lib/store/index.ts +++ b/packages/core/src/lib/store/index.ts @@ -27,7 +27,7 @@ import { Uint8ArrayList } from "uint8arraylist"; import { DefaultPubSubTopic } from "../constants.js"; import { toProtoMessage } from "../to_proto_message.js"; -import { HistoryRPC, PageDirection, Params } from "./history_rpc.js"; +import { HistoryRpc, PageDirection, Params } from "./history_rpc.js"; import HistoryError = proto.HistoryResponse.HistoryError; @@ -297,7 +297,7 @@ async function* paginate( queryOpts.cursor = currentCursor; const stream = await connection.newStream(protocol); - const historyRpcQuery = HistoryRPC.createQuery(queryOpts); + const historyRpcQuery = HistoryRpc.createQuery(queryOpts); log( "Querying store peer",