From eca3c70833c28cb054ae09acd70ef971a70cb822 Mon Sep 17 00:00:00 2001 From: Cayman Date: Wed, 19 Feb 2020 13:15:57 -0600 Subject: [PATCH] Address PR comments --- src/publicKey.ts | 2 +- src/signature.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/publicKey.ts b/src/publicKey.ts index 6babd16..c072ac8 100644 --- a/src/publicKey.ts +++ b/src/publicKey.ts @@ -57,7 +57,7 @@ export class PublicKey { } public toHexString(): string { - return `0x${Buffer.from(this.toBytesCompressed()).toString("hex")}`; + return `0x${this.toBytesCompressed().toString("hex")}`; } public getValue(): PublicKeyType { diff --git a/src/signature.ts b/src/signature.ts index 7d8786e..ef97998 100644 --- a/src/signature.ts +++ b/src/signature.ts @@ -51,7 +51,7 @@ export class Signature { domain = padLeft(domain, 8); return this.value.verifyAggregatedHashWithDomain( publicKeys.map((key) => key.getValue()), - messages.map((message) => Buffer.concat([Buffer.from(message as Uint8Array), domain as Uint8Array])) + messages.map((message) => Buffer.concat([message, domain])) ); }