From 4cfe663b44ec0aeefb8a520b6ed63dbb4f54c869 Mon Sep 17 00:00:00 2001 From: Zane Kharitonov Date: Fri, 20 Dec 2024 10:38:45 -0500 Subject: [PATCH] run prettier --- packages/api-key-stamper/src/utils.ts | 4 +++- packages/sdk-browser/src/utils.ts | 10 ++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/api-key-stamper/src/utils.ts b/packages/api-key-stamper/src/utils.ts index 2fe465a9..2b7feec9 100644 --- a/packages/api-key-stamper/src/utils.ts +++ b/packages/api-key-stamper/src/utils.ts @@ -15,7 +15,9 @@ export function convertTurnkeyApiKeyToJwk(input: { try { jwk = pointDecode(uint8ArrayFromHexString(compressedPublicKeyHex)); } catch (e) { - throw new Error(`invalid API key: Ensure that you are using a valid public and private key in compressed or uncompressed format and they are not switched`); + throw new Error( + `invalid API key: Ensure that you are using a valid public and private key in compressed or uncompressed format and they are not switched` + ); } // Ensure that d is sufficiently padded diff --git a/packages/sdk-browser/src/utils.ts b/packages/sdk-browser/src/utils.ts index 95daacaa..c7a92379 100644 --- a/packages/sdk-browser/src/utils.ts +++ b/packages/sdk-browser/src/utils.ts @@ -33,11 +33,13 @@ export const createEmbeddedAPIKey = async ( const targetKeyBytes = uint8ArrayFromHexString(targetPublicKey); let jwk; - try { - jwk = pointDecode(targetKeyBytes); - } catch (e) { + try { + jwk = pointDecode(targetKeyBytes); + } catch (e) { // provide more context about the error that is being thrown - throw new Error(`target public key is not a valid compressed public key: ${targetPublicKey}`); + throw new Error( + `target public key is not a valid compressed public key: ${targetPublicKey}` + ); } const targetKey = await crypto.subtle.importKey(