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)); }