diff --git a/packages/idos-sdk-js/src/lib/data.ts b/packages/idos-sdk-js/src/lib/data.ts index 474d11f46..de35df745 100644 --- a/packages/idos-sdk-js/src/lib/data.ts +++ b/packages/idos-sdk-js/src/lib/data.ts @@ -18,7 +18,7 @@ export class Data { constructor( public readonly kwilWrapper: KwilWrapper, public readonly enclave: Enclave, - ) { } + ) {} singularize(tableName: string): string { return tableName.replace(/s$/, ""); @@ -80,7 +80,7 @@ export class Data { if (tableName === "credentials") { recipientEncryptionPublicKey ??= base64Encode(await this.enclave.ready()); - if (!recipientEncryptionPublicKey) throw new Error("Missing recipientEncryptionPublicKey") + if (!recipientEncryptionPublicKey) throw new Error("Missing recipientEncryptionPublicKey"); for (const record of records) { Object.assign( @@ -132,7 +132,7 @@ export class Data { if (tableName === "credentials") { recipientEncryptionPublicKey ??= base64Encode(await this.enclave.ready()); - if (!recipientEncryptionPublicKey) throw new Error("Missing recipientEncryptionPublicKey") + if (!recipientEncryptionPublicKey) throw new Error("Missing recipientEncryptionPublicKey"); Object.assign( record, @@ -269,7 +269,7 @@ export class Data { if (tableName === "credentials") { recipientEncryptionPublicKey ??= base64Encode(await this.enclave.ready()); - if (!recipientEncryptionPublicKey) throw new Error("Missing recipientEncryptionPublicKey") + if (!recipientEncryptionPublicKey) throw new Error("Missing recipientEncryptionPublicKey"); Object.assign( record, diff --git a/packages/idos-sdk-js/src/lib/enclave.ts b/packages/idos-sdk-js/src/lib/enclave.ts index 1b08c458e..b39644ec7 100644 --- a/packages/idos-sdk-js/src/lib/enclave.ts +++ b/packages/idos-sdk-js/src/lib/enclave.ts @@ -10,7 +10,7 @@ export class Enclave { constructor( public readonly auth: Auth, public readonly provider: EnclaveProvider, - ) { } + ) {} async load() { await this.provider.load(); @@ -48,7 +48,9 @@ export class Enclave { const { content, encryptorPublicKey } = await this.provider.encrypt( utf8Encode(message), - recipientEncryptionPublicKey === undefined ? undefined : base64Decode(recipientEncryptionPublicKey), + recipientEncryptionPublicKey === undefined + ? undefined + : base64Decode(recipientEncryptionPublicKey), ); return {