From ace5f2776f6ad7e2a1d9558ea6223ed7d9e4d698 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Mon, 10 May 2021 11:43:57 +1000 Subject: [PATCH] Prefer camel case for module constants --- src/lib/waku_message.ts | 12 ++++++------ src/lib/waku_store/history_rpc.ts | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib/waku_message.ts b/src/lib/waku_message.ts index cb1331c537..407a093fea 100644 --- a/src/lib/waku_message.ts +++ b/src/lib/waku_message.ts @@ -4,8 +4,8 @@ import { Reader } from 'protobufjs/minimal'; // Protecting the user from protobuf oddities import * as proto from '../proto/waku/v2/message'; -export const DEFAULT_CONTENT_TOPIC = '/waku/2/default-content/proto'; -const DEFAULT_VERSION = 0; +export const DefaultContentTopic = '/waku/2/default-content/proto'; +const DefaultVersion = 0; export class WakuMessage { public constructor(public proto: proto.WakuMessage) {} @@ -18,12 +18,12 @@ export class WakuMessage { */ static fromUtf8String( utf8: string, - contentTopic: string = DEFAULT_CONTENT_TOPIC + contentTopic: string = DefaultContentTopic ): WakuMessage { const payload = Buffer.from(utf8, 'utf-8'); return new WakuMessage({ payload, - version: DEFAULT_VERSION, + version: DefaultVersion, contentTopic, }); } @@ -36,11 +36,11 @@ export class WakuMessage { */ static fromBytes( payload: Uint8Array, - contentTopic: string = DEFAULT_CONTENT_TOPIC + contentTopic: string = DefaultContentTopic ): WakuMessage { return new WakuMessage({ payload, - version: DEFAULT_VERSION, + version: DefaultVersion, contentTopic, }); } diff --git a/src/lib/waku_store/history_rpc.ts b/src/lib/waku_store/history_rpc.ts index 8adb105616..3e3fdb537a 100644 --- a/src/lib/waku_store/history_rpc.ts +++ b/src/lib/waku_store/history_rpc.ts @@ -2,14 +2,14 @@ import { Reader } from 'protobufjs/minimal'; import { v4 as uuid } from 'uuid'; import * as proto from '../../proto/waku/v2/store'; -import { DEFAULT_CONTENT_TOPIC } from '../waku_message'; +import { DefaultContentTopic } from '../waku_message'; import { RelayDefaultTopic } from '../waku_relay'; export class HistoryRPC { public constructor(public proto: proto.HistoryRPC) {} static createQuery( - contentTopics: string[] = [DEFAULT_CONTENT_TOPIC], + contentTopics: string[] = [DefaultContentTopic], cursor?: proto.Index, pubsubTopic: string = RelayDefaultTopic ): HistoryRPC {