From a2844b48f4b3a345800e44207bf419384d8d05b0 Mon Sep 17 00:00:00 2001 From: Vincent Date: Fri, 5 Jun 2020 17:07:54 +1000 Subject: [PATCH] linted --- ts/session/sending/PendingMessageCache.ts | 13 ++++++++++--- ts/session/types/PubKey.ts | 2 -- ts/test/test-utils/testUtils.ts | 1 - 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ts/session/sending/PendingMessageCache.ts b/ts/session/sending/PendingMessageCache.ts index 591b3c66a..1ee45e338 100644 --- a/ts/session/sending/PendingMessageCache.ts +++ b/ts/session/sending/PendingMessageCache.ts @@ -13,13 +13,13 @@ import * as MessageUtils from '../utils'; export class PendingMessageCache { public readonly isReady: Promise; - private cache: Array; + private cache: Array; constructor() { // Load pending messages from the database // You should await isReady on making a new PendingMessageCache // if you'd like to have instant access to the cache - this.cache = ['bleep']; + this.cache = []; this.isReady = new Promise(async resolve => { await this.loadFromDB(); @@ -116,7 +116,14 @@ export class PendingMessageCache { const barePending = JSON.parse(String(data.value)); const pending = barePending.map((message: any) => { - const { identifier, plainTextBuffer, timestamp, device, ttl, encryption } = message; + const { + identifier, + plainTextBuffer, + timestamp, + device, + ttl, + encryption, + } = message; return { identifier, diff --git a/ts/session/types/PubKey.ts b/ts/session/types/PubKey.ts index c62f4e6af..5653db5b5 100644 --- a/ts/session/types/PubKey.ts +++ b/ts/session/types/PubKey.ts @@ -1,4 +1,3 @@ - export class PubKey { public static readonly PUBKEY_LEN = 66; private static readonly regex: string = `^05[0-9a-fA-F]{${PubKey.PUBKEY_LEN - @@ -26,5 +25,4 @@ export class PubKey { return false; } - } diff --git a/ts/test/test-utils/testUtils.ts b/ts/test/test-utils/testUtils.ts index 821e655ff..a8ced37d5 100644 --- a/ts/test/test-utils/testUtils.ts +++ b/ts/test/test-utils/testUtils.ts @@ -8,7 +8,6 @@ import { ImportMock } from 'ts-mock-imports'; import { PubKey } from '../../../ts/session/types'; import { ChatMessage } from '../../session/messages/outgoing'; - const sandbox = sinon.createSandbox(); // We have to do this in a weird way because Data uses module.exports