diff --git a/packages/automated-dispute/src/eboActor.ts b/packages/automated-dispute/src/eboActor.ts index eba43f0..889c04b 100644 --- a/packages/automated-dispute/src/eboActor.ts +++ b/packages/automated-dispute/src/eboActor.ts @@ -433,7 +433,7 @@ export class EboActor { */ public canBeTerminated(blockNumber: bigint): boolean { const request = this.getActorRequest(); - const isRequestFinalized = request.status === "finalized"; + const isRequestFinalized = request.status === "Finalized"; const nonSettledProposals = this.activeProposals(blockNumber); return isRequestFinalized && nonSettledProposals.length === 0; diff --git a/packages/automated-dispute/src/services/eboRegistry/commands/addRequest.ts b/packages/automated-dispute/src/services/eboRegistry/commands/addRequest.ts index eaa8f12..5d57fcc 100644 --- a/packages/automated-dispute/src/services/eboRegistry/commands/addRequest.ts +++ b/packages/automated-dispute/src/services/eboRegistry/commands/addRequest.ts @@ -20,7 +20,7 @@ export class AddRequest implements EboRegistryCommand { epoch: event.metadata.epoch, createdAt: event.blockNumber, prophetData: event.metadata.request, - status: "active", + status: "Active", }; return new AddRequest(registry, request); diff --git a/packages/automated-dispute/src/services/eboRegistry/commands/finalizeRequest.ts b/packages/automated-dispute/src/services/eboRegistry/commands/finalizeRequest.ts index 6317d9c..a84f21f 100644 --- a/packages/automated-dispute/src/services/eboRegistry/commands/finalizeRequest.ts +++ b/packages/automated-dispute/src/services/eboRegistry/commands/finalizeRequest.ts @@ -28,7 +28,7 @@ export class FinalizeRequest implements EboRegistryCommand { this.previousStatus = this.request.status; - this.registry.updateRequestStatus(this.request.id, "finalized"); + this.registry.updateRequestStatus(this.request.id, "Finalized"); this.wasRun = true; } diff --git a/packages/automated-dispute/src/types/prophet.ts b/packages/automated-dispute/src/types/prophet.ts index 0c3d699..9776991 100644 --- a/packages/automated-dispute/src/types/prophet.ts +++ b/packages/automated-dispute/src/types/prophet.ts @@ -3,7 +3,7 @@ import { NormalizedAddress } from "@ebo-agent/shared"; import { Address } from "viem"; export type RequestId = NormalizedAddress; -export type RequestStatus = "active" | "finalized"; +export type RequestStatus = "Active" | "Finalized"; export interface Request { id: RequestId; diff --git a/packages/automated-dispute/tests/eboActor/fixtures.ts b/packages/automated-dispute/tests/eboActor/fixtures.ts index 3f566d0..e6b3e80 100644 --- a/packages/automated-dispute/tests/eboActor/fixtures.ts +++ b/packages/automated-dispute/tests/eboActor/fixtures.ts @@ -12,7 +12,7 @@ export const DEFAULT_MOCKED_REQUEST_CREATED_DATA: Request = { chainId: "eip155:1", epoch: 1n, createdAt: 1n, - status: "active", + status: "Active", prophetData: { disputeModule: "0x01" as Address, finalityModule: "0x02" as Address, diff --git a/packages/automated-dispute/tests/services/eboActor.spec.ts b/packages/automated-dispute/tests/services/eboActor.spec.ts index 3433016..a416ef9 100644 --- a/packages/automated-dispute/tests/services/eboActor.spec.ts +++ b/packages/automated-dispute/tests/services/eboActor.spec.ts @@ -272,7 +272,7 @@ describe("EboActor", () => { it("returns false if the request is finalized but there's one active dispute", () => { const request: Request = { ...DEFAULT_MOCKED_REQUEST_CREATED_DATA, - status: "finalized", + status: "Finalized", }; const response = mocks.buildResponse(request); @@ -294,7 +294,7 @@ describe("EboActor", () => { it("returns true once everything is settled", () => { const request: Request = { ...DEFAULT_MOCKED_REQUEST_CREATED_DATA, - status: "finalized", + status: "Finalized", }; const disputedResponse = mocks.buildResponse(request, { id: "0x01" }); diff --git a/packages/automated-dispute/tests/services/eboMemoryRegistry/commands/finalizeRequest.spec.ts b/packages/automated-dispute/tests/services/eboMemoryRegistry/commands/finalizeRequest.spec.ts index 0202c13..b381b43 100644 --- a/packages/automated-dispute/tests/services/eboMemoryRegistry/commands/finalizeRequest.spec.ts +++ b/packages/automated-dispute/tests/services/eboMemoryRegistry/commands/finalizeRequest.spec.ts @@ -39,7 +39,7 @@ describe("FinalizeRequest", () => { command.run(); - expect(registry.updateRequestStatus).toHaveBeenCalledWith(request.id, "finalized"); + expect(registry.updateRequestStatus).toHaveBeenCalledWith(request.id, "Finalized"); }); it("throws if the command was already run", () => { @@ -62,7 +62,7 @@ describe("FinalizeRequest", () => { expect(registry.updateRequestStatus).toHaveBeenNthCalledWith( 1, request.id, - "finalized", + "Finalized", ); expect(registry.updateRequestStatus).toHaveBeenNthCalledWith(