diff --git a/example/src/tests/groupTests.ts b/example/src/tests/groupTests.ts index 994947a93..68d6cd818 100644 --- a/example/src/tests/groupTests.ts +++ b/example/src/tests/groupTests.ts @@ -49,12 +49,11 @@ test('can make a MLS V3 client', async () => { return true }) - test('calls preAuthenticateToInboxCallback when supplied', async () => { let isCallbackCalled = 0 let isPreAuthCalled = false const preAuthenticateToInboxCallback = () => { - isCallbackCalled++; + isCallbackCalled++ isPreAuthCalled = true } const preEnableIdentityCallback = () => { @@ -65,11 +64,9 @@ test('calls preAuthenticateToInboxCallback when supplied', async () => { } const keyBytes = new Uint8Array([ 233, 120, 198, 96, 154, 65, 132, 17, 132, 96, 250, 40, 103, 35, 125, 64, - 166, 83, 208, 224, 254, 44, 205, 227, 175, 49, 234, 129, 74, 252, 135, - 145, + 166, 83, 208, 224, 254, 44, 205, 227, 175, 49, 234, 129, 74, 252, 135, 145, ]) - await Client.createRandom({ env: 'local', enableV3: true, diff --git a/src/lib/Client.ts b/src/lib/Client.ts index f9a3c6f76..5f784ce16 100644 --- a/src/lib/Client.ts +++ b/src/lib/Client.ts @@ -152,11 +152,16 @@ export class Client< enableSubscription?: Subscription, authInboxSubscription?: Subscription ): void { - [createSubscription, enableSubscription, authInboxSubscription, this.signSubscription, this.authSubscription] - .forEach(subscription => subscription?.remove()); - - this.signSubscription = null; - this.authSubscription = null; + ;[ + createSubscription, + enableSubscription, + authInboxSubscription, + this.signSubscription, + this.authSubscription, + ].forEach((subscription) => subscription?.remove()) + + this.signSubscription = null + this.authSubscription = null } /** @@ -328,10 +333,10 @@ export class Client< /** * Static method to determine the inboxId for the address. - * + * * @param {string} peerAddress - The address of the peer to check for messaging eligibility. * @param {Partial} opts - Optional configuration options for the Client. - * @returns {Promise} + * @returns {Promise} */ static async getOrCreateInboxId( address: string,