From 20b193b1f653fc594347fb983d6872c922d93563 Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 9 Jun 2020 14:08:18 +1000 Subject: [PATCH] rm protocol stub --- .../utils/stubs/SignalAddressProtocolStub.ts | 33 ------------------- 1 file changed, 33 deletions(-) delete mode 100644 ts/test/utils/stubs/SignalAddressProtocolStub.ts diff --git a/ts/test/utils/stubs/SignalAddressProtocolStub.ts b/ts/test/utils/stubs/SignalAddressProtocolStub.ts deleted file mode 100644 index 6ee55392b..000000000 --- a/ts/test/utils/stubs/SignalAddressProtocolStub.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { SignalProtocolAddress } from '../../../window/types/libsignal-protocol'; - -export class SignalProtocolAddressStub extends SignalProtocolAddress { - private readonly hexEncodedPublicKey: string; - private readonly deviceId: number; - constructor(hexEncodedPublicKey: string, deviceId: number) { - super(hexEncodedPublicKey, deviceId); - this.hexEncodedPublicKey = hexEncodedPublicKey; - this.deviceId = deviceId; - } - - // tslint:disable-next-line: function-name - public static fromString(encodedAddress: string): SignalProtocolAddressStub { - const values = encodedAddress.split('.'); - - return new SignalProtocolAddressStub(values[0], Number(values[1])); - } - - public getName(): string { - return this.hexEncodedPublicKey; - } - public getDeviceId(): number { - return this.deviceId; - } - - public equals(other: SignalProtocolAddress): boolean { - return other.getName() === this.hexEncodedPublicKey; - } - - public toString(): string { - return this.hexEncodedPublicKey; - } -}