From 2eaa4ef9bba11928045af350620710578d690886 Mon Sep 17 00:00:00 2001 From: Bahruz Aghalarov Date: Mon, 9 Sep 2024 16:00:25 +0400 Subject: [PATCH] Made recoverMessageAddress method synchronous --- packages/client/src/stream.ts | 2 +- packages/client/test/stream.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/client/src/stream.ts b/packages/client/src/stream.ts index 526a0e6d..af7b3aba 100644 --- a/packages/client/src/stream.ts +++ b/packages/client/src/stream.ts @@ -39,7 +39,7 @@ export class ReadableEventStream { const requestId = pushReq.requestId; for (const anyEvt of pushReq.events) { const event = schema.ShopEvent.decode(anyEvt.event.value); - const signer = await recoverMessageAddress({ + const signer = recoverMessageAddress({ message: { raw: anyEvt.event.value }, signature: anyEvt.signature, }); diff --git a/packages/client/test/stream.test.ts b/packages/client/test/stream.test.ts index 663d5eb9..79c0e4af 100644 --- a/packages/client/test/stream.test.ts +++ b/packages/client/test/stream.test.ts @@ -43,7 +43,7 @@ class MockClient { } } -describe("Stream", async () => { +describe("Stream", () => { test("Stream Creation", async () => { const testCreateItem = { updateItem: { @@ -65,7 +65,7 @@ describe("Stream", async () => { evt.event.updateItem, schema.UpdateItem.create(testCreateItem.updateItem), ); - expect(evt.signer).toEqual(account.address); + expect(await evt.signer).toEqual(account.address); break; }