From c286cca6916947140e83ae5261b07a745f095ed9 Mon Sep 17 00:00:00 2001 From: Denis Carriere Date: Wed, 14 Feb 2024 21:01:28 -0500 Subject: [PATCH] format --- src/auth.ts | 2 +- src/postWebhook.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/auth.ts b/src/auth.ts index dd84fca..affbd31 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -19,7 +19,7 @@ export function checkKey(key: Hex, type: "public" | "private") { // TweetNaCl.js private key (includes public key) // split the private key from the public key export function parsePrivateKey(privateKey?: string) { - if ( !privateKey ) return; + if (!privateKey) return; if (typeof privateKey === "string" && privateKey.length === 128) { return privateKey.slice(0, 64); } diff --git a/src/postWebhook.ts b/src/postWebhook.ts index e69a874..16ec796 100644 --- a/src/postWebhook.ts +++ b/src/postWebhook.ts @@ -41,11 +41,11 @@ export async function postWebhook(url: string, body: string, secretKey?: Hex, op const timestamp = createTimestamp(); const headers = new Headers([ ["content-type", "application/json"], - ["x-signature-timestamp", String(timestamp)] + ["x-signature-timestamp", String(timestamp)], ]); // optional signature - if ( secretKey) { + if (secretKey) { headers.set("x-signature-ed25519", sign(timestamp, body, secretKey)); }