From 73d5dac561ddc2a7c0b2724719b6c1eaa1c8c9c6 Mon Sep 17 00:00:00 2001 From: Shane da Silva Date: Tue, 28 Jan 2025 14:09:46 -0800 Subject: [PATCH] fix: Correct typo in Factory builder (#2507) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Why is this change needed? Typo was breaking tests. ## Merge Checklist - [x] PR title adheres to the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) standard - [x] PR has a [changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets) - [ ] PR has been tagged with a change label(s) (i.e. documentation, feature, bugfix, or chore) - [ ] PR includes [documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs) if necessary. --- ## PR-Codex overview This PR focuses on updating the use of `Factories.Ed25519PPublicKey` to `Factories.Ed25519PublicKey` in test files to ensure consistency and correctness in the handling of public key types. ### Detailed summary - In `apps/hubble/src/storage/db/message.test.ts`, changed `Factories.Ed25519PPublicKey.build()` to `Factories.Ed25519PublicKey.build()` in a test case. - In `packages/core/src/validations.test.ts`, updated `Factories.Ed25519PPublicKey.build()` to `Factories.Ed25519PublicKey.build()` in two instances where a message is created for validation testing. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- apps/hubble/src/storage/db/message.test.ts | 4 +--- packages/core/src/validations.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/hubble/src/storage/db/message.test.ts b/apps/hubble/src/storage/db/message.test.ts index 25c4f87650..939f46d48b 100644 --- a/apps/hubble/src/storage/db/message.test.ts +++ b/apps/hubble/src/storage/db/message.test.ts @@ -199,8 +199,6 @@ describe("getAllMessagesBySigner", () => { }); test("succeeds with no results", async () => { - await expect(getAllMessagesBySigner(castMessage.data.fid, Factories.Ed25519PPublicKey.build())).resolves.toEqual( - [], - ); + await expect(getAllMessagesBySigner(castMessage.data.fid, Factories.Ed25519PublicKey.build())).resolves.toEqual([]); }); }); diff --git a/packages/core/src/validations.test.ts b/packages/core/src/validations.test.ts index 36f214ad6a..063b9dc160 100644 --- a/packages/core/src/validations.test.ts +++ b/packages/core/src/validations.test.ts @@ -1372,7 +1372,7 @@ describe("validateMessage", () => { test("fails with invalid signature", async () => { const message = await Factories.Message.create({ signature: Factories.Ed25519Signature.build(), - signer: Factories.Ed25519PPublicKey.build(), + signer: Factories.Ed25519PublicKey.build(), }); const result = await validations.validateMessage(message); @@ -1382,7 +1382,7 @@ describe("validateMessage", () => { test("fails with invalid signature data", async () => { const message = await Factories.Message.create({ signature: Factories.Bytes.build({}, { transient: { length: 0 } }), - signer: Factories.Ed25519PPublicKey.build(), + signer: Factories.Ed25519PublicKey.build(), }); const result = await validations.validateMessage(message);